Visual Studio Macros “Cannot load the recording macro…”

Error
“Cannot load the recording macro project ” for the following reason:
‘C:\Users\<username>\Documents\Visual Studio 2010\Projects\VSMacros80\MyMacros\MyMacros.vsmacros’ is an invalid or inaccessible macro project file
Would you like to recreate it?”
Yes or No

Solved Answer No.
The problem may well be that you are not using C, maybe using D or another drive.

If looking in the wrong place then set the macro recording project to the other project then unload the current project. If necessary move any new created macro project to where you want it then open it. Repeat for samples.

Windows Forms DataBinding displays ‘System.Data.DataRowView’ in text boxes and other controls

ERROR

Windows Forms DataBinding displays ‘System.Data.DataRowView’ in text boxes and other controls

SOLVED

Was a ComboBox databinding pointing at a field no longer in the dataset.

Problem: Dataset does not generate Insert command

SOLVED today by:

Changing the select statement to SELECT * FROM then pull the fields in again.

Some SQL Server 2005 services are not listed in SQL Server Configuration Manager – Also Red Cross shown in IIS – Server 2003

PROBLEM

  1. Some SQL Server 2005 services are not listed in SQL Server Configuration Manager
  2. Red Cross shown in IIS – Server 2003

SOLVED QUICK

BITS – Background Intelligent Transfer Service may not be registered and may have a startup type of Manual and be Stopped.

regsvr32.exe qmgr.dll
regsvr32.exe qmgrprxy.dll

Then reboot.

SOLVED DETAIL

by external support company. Asked them how they did it. Answer copied here:

It looks like a windows update was responsible for the failure, Steve correctly spotted the fundamental issue which was that the default web site was stopped in IIS.  By attempting to start IIS, this registered an event in the windows logs and I could diagnose the issue from there.

The earlier versions of SQL reporting prior to 2008 relied on IIS to operate and the failure of IIS to start resulted in the missing items in SQL.

Windows update installed a hot fix which altered a file responsible for BITS (the service that enables Windows Update to function), the update applied an updated version of a file for IIS and the file failed to register when it was installed.  IIS was effectively looking for a file which wasn’t present and stopped itself.

By re-registering the file and rebooting, IIS was able to recognise the updated file and the default web site started successfully.  As the default website hosts information referred to by SQL, this caused SQL reporting to re-appear.

An odd one, but then Microsoft updates are probably responsible for a lot of strange behaviour!

Incidentally, while I was on the server, I spotted a string of Windows Desktop Search errors in the log – Windows Desktop Search was given as an update by Microsoft and it is my personal view that the product is poorly designed and disables perfectly good search facilities included within Windows, it looks like it has been clogging your event log with errors for some time now and with both of these things in mind,  I have disabled the Windows Desktop Search.

Anyway, glad SQL & IIS are now working, please let me know if you have any further issues.

Error 3031: Problem in mapping fragments starting at line… nullable column

Error 3031: Problem in mapping fragments starting at line… nullable column

In SQL I added a column to a table and initially had the column as Not Nullable. I then updated a view to use the new column. I then updated Entity Framework model from the database. I then changed my mind and made the column nullable. I then updated EF model once again and it would not compile. No-manner of updating column Nullable properties worked.

After some reading suggested this was a bug in EF. As a precaution I updated the view in SQL to refresh the schema went to EF and removed and added it again.

Crystal Reports run-time error – “Failed to open a rowset”

Details: HY000:[Microsoft][SQL Server Native Client 10.0]Connection is busy with results for another comand

SOLVED
Report ran in Crystal Reports designer. Problem turned out to be that there was an unlinked table in Visual designer. Replaced the fields from this table with fields in a view, then removed this table from the report and report then ran

USED this entry:
SRS 18th Dec 2012

THIS ERROR Can also be if there are truly multiple start points for your Crystal Report

In this case use two connections.  This could be the same ODBC connection added to the report again. This works as proved 11-Jan-13
See Purchasing\Requirements.rpt

VPN gets stuck on “Verifying username and password”

When attempting to connect the VPN gets stuck on “Verifying username and password” (hangs). After a while it then gets stuck on “Connecting to **.**.***.*** using *” and eventually returns a long message and may attempt to redial. The solution below is for messages containing text including GRE.

HYPOTHESES

  1. Also I was using both a laptop and PC with VPN switching to a couple of companies. It may fail on one machine if the other machine is already logged in.
  2. Possibly following a failed connection, I found that a VPN I have used a lot on Windows 7 had a blank User name: when this was normally filled in.

EXPERIMENT

  1. Hypothesis 1:- Reverse the first machine to log in. This time the other machine VPN started failing and in fact scenario 2, the User name became blank.

SOLVED
Create a new VPN which worked, then delete the old VPN

UNSOLVED
For error message 800 there are different problems. One of these is conflict between two computers. There may be a timeout on the server before another computer may connect, possible 30 minutes. Secondly may need to uncheck “Use default gateway on remote network”, this worked once, did not work several times.

ALSO
There are pages on web e.g. however first try above
http://www.sevenforums.com/network-sharing/90522-vpn-not-accepting-incoming-connections.html

SQL Server Operators – SQL Agent Alert System – Notify Operators

After adding SQL Operators you need to restart SQL Agent

ERROR in SQL Agent Jobs
… NOTE: Failed to notify ‘<operator name>’ via email.

[476] Database Mail is not enabled for agent notifications. Cannot send e-mail to
[475] Database Mail is not enabled for agent notifications.

May have log in SSMS > SQL Server Agent > Error Logs

SOLVED
Credit to:
http://sqlblog.jfperry.com/jpsql/post/2009/04/07/NOTE-Failed-to-notify-7boperator7d-via-email.aspx

This was set up on one of my work servers. For a different company this needed to be set up.

On SQL 2005+ you have to tell SQL Server Agent / Properties / Alert System, which profile that you’d like to enable. Here’s what it does.
e.g. and don’t forget to restart SQL Agent

To set up SQL Server Agent Mail to use Database Mail

  1. In Object Explorer, expand a server.
  2. Right-click SQL Server Agent, and then click Properties.
  3. Click Alert System.
  4. Select Enable Mail Profile.
  5. In the Mail system list, choose Database Mail.
  6. In the Mail profile list, select a mail profile for Database Mail.

Or less likely Transact SQL

USE [msdb]
GO
EXEC master.dbo.xp_instance_regwrite
N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\SQLServerAgent',
N'DatabaseMailProfile',
N'REG_SZ',
N'MyDatabaseProfile'
GO

“Missing Operating system” on Boot

ERROR Yikes.
When  playing with BIOS settings to try and use Graphics card + OnBoard (see previous post), I was curious to see if OnBoard would work on it’s own. So change one option to IDE, with no graphics card. At this point I had no monitor, possibly only on boot. I may have at some point used some form of Restore Default Settings. From this point forth it would not boot, but would just display “Missing Operating System”.

SOLVED: With more technical support we realised that the SATA configuration settings were something other than RAID, which this machine is on. After reverting this back to RAID the machine booted again.

SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

ERROR:
SQL Agent job calling stored procedure msdb.dbo.sp_send_dbmail @query does not return any records

SOLUTION
Add the Database Name into the @query

BACKGROUND
This may be because of the default database of the account which executes the SQL Agent job.

EXAMPLE
If @query does not include the database name (three-part naming), it is possible that although the EXISTS may fire, the @query does not.
To solve add the Database Name into the @query.

BEGIN TRY

IF EXISTS(SELECT * FROM Production.vAuditSOCDBTable)
  BEGIN
   DECLARE @MyBody nvarchar(100)
   SET @MyBody = ‘<message>’ + char(13) + char(10)

   EXEC msdb.dbo.sp_send_dbmail
    @profile_name = ‘<>’,
    @recipients = ”,
    @blind_copy_recipients = ”,
    @query = ‘SELECT * FROM <databasename>..’,
    –or possibly @execute_query_database = ‘databasename’,
    @subject = ‘subject’,
    –@attach_query_result_as_file = 1 ,
    @body = @MyBody;

   PRINT ‘message’
  END
 ELSE
  PRINT ‘nothing in audit’

END TRY
BEGIN CATCH
 SELECT ERROR_NUMBER() ErrorNumber, ERROR_MESSAGE() [Message]
 PRINT ‘FAILED’
END CATCH