Archive for the 'SQL Server' Category

When trying to connect to SQL Server instance using SQL Server Management Studio 2008 (Express), you might stumble upon this error: Failed to retrieve data for this request. (Microsoft.sqlserver.management.sdk.sfc). Databases will not be enlisted in the Object Explorer and that’s really bad. Luckly there’s a solution for that.

Close the error message
Press F7 to open the Object Explorer […]

Read Full Post »

You did some testing on your database before deploying it and you created new record and then deleted it right away, but there is a hole in your primary key ID’s now and it shouldn’t be.  How to fix that before deploying it to production environment ?
It’s quite easy, just open SQL Server Managment Studio and fix it using this T-SQL:
DECLARE @LastID […]

Read Full Post »

I’ve just come to conclusion that there’s another annoying thing which is actually very common when working with TableAdapters,  ObjectDataSource and DataBinded controls on a WebForm. For example, when you use a DataBinded DropDownList control in a DetailView control to choose one value for your ForeignKey, everything works fine, until your ForeignKey has a Null value, and there is no such value in a […]

Read Full Post »

If for some reason enabling CLR in SQL Server 2005 does not work from within SQL Server Surface Area Configuration GUI, there is a way to enable it through good old T-SQL. Just open SQL Server Managment Studio and type in:
sp_configure ‘CLR enabled’,1 
GO
reconfigure
GO

Read Full Post »