You may receive “Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc” while connection to database. I got the error when I tried to connect to SQL Server 2005 from Visual studio 2008 using server explorer. The exact error is,
Could not load file or assembly ‘Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91′ or one of its dependencies. The system [...]
Archive for the ‘Sql Server’ Category
Could not load file or assembly Microsoft.SqlServer.Management.Sdk.Sfc
Posted in DotNet 2.0, DotNet 3.0, Sql Server, Techincal on May 14, 2009 | 17 Comments »
Integrate Youtube in ASP.NET
Posted in DotNet 2.0, Javascript, Sql Server, Techincal on September 16, 2008 | 14 Comments »
I will discuss how to integrate youtube video in asp.net. Youtube provides the API to access the its huge database of videos. It also provides search facility and customized player for integration.
First thing you need is to get developer key for accessing youtube service. You can get it from here. Once you get the [...]
GROUP BY, CUBE, ROLLUP and SQL SERVER 2005
Posted in DotNet 2.0, Sql Server, Techincal on September 9, 2008 | 21 Comments »
I learn about CUBE and ROLLUP function today and I found it really usefull for generating reports. Let me give you one example where we can use ROLLUP and CUBE. Lets say you are developing the E-Commerce application and administrator wants the report which shows products purchased by all user group by product and [...]
How to Encrypt connection string in web.config
Posted in DotNet 2.0, Sql Server, Techincal on August 11, 2008 | 16 Comments »
The most sensitive information stored in web.config file can be the connection string. You do not want to disclose the information related to your database to all the users where the application is deployed. Every time it is not possible to have a private machine for your sites, you may need to deploy the [...]
Using CASE with ORDER BY in SQL Server
Posted in DotNet 2.0, Sql Server, Techincal on April 4, 2008 | 5 Comments »
Today I came to know that we can use CASE with ORDER BY clause. Its a nice functionality which helps you to avoid UNIOUN when you have to display the records in some specific order and still you need to sort them.
As shown below I have created an Employee table with ID (Primary [...]
IDENT_CURRENT, @@IDENTITY and SCOPE_IDENTITY()
Posted in DotNet 2.0, Sql Server, Techincal on March 17, 2008 | 1 Comment »
A very common question during the interview is to provide difference between IDENT_CURRENT, @@IDENTITY and SCOPE_IDENTITY(). All are used to retrieve the value of identity column after DML statement execution. All three functions return last-generated identity values. However, the scope and session on which last is defined in each of these functions differ:
IDENT_CURRENT returns [...]
CLR Stored Procedure in SQL Server 2005
Posted in DotNet 2.0, Sql Server, Techincal on March 11, 2008 | 29 Comments »
As we all know SQL Server 2005 has CLR integrated with it. This means one can write a code in manage application and execute it SQL Server. I read about this since Microsoft has launched SQL Server 2005, however I have never used it practically till last week.
First question came in my mind [...]
Authorize.Net Integration using ASP.Net
Posted in DotNet 2.0, Sql Server, Techincal on February 25, 2008 | 10 Comments »
Recently we had integrated Authorize.Net as a payment one of the payment gateway in application. Integrating Authorize.Net is a really simple task.
First you need to register for test account. Here is the link for that. You will get a mail from Authorize.Net team regarding the approval of account. You will receive your [...]
The media set has 2 media families but only 1 are provided.
Posted in Sql Server, Techincal on February 15, 2008 | 7 Comments »
You get this error while restoring the database backup file in SQL Server 2005. This is because when you took the backup your backup file is divided in more than one part and at the time of restoring the database you have not added all the parts.
Lets do this practically so that you can [...]
Query to find all the tables and columns in selected database.
Posted in Sql Server, Techincal on February 8, 2008 | 12 Comments »
As a developer, it is really important for us to understand database design and underlying tables used in application. Sometime we do not have direct access to database server so that we can not open the server console and look in to the database.
In this case we can take help of SysObjects, SysColumns, SysTypes [...]