i was doing a code which connects to northwind database
Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
namespace ConsoleApplication4
{
class Program
{
static void Main(string[] args)
{
string source = "server =(local);" + "integrated security =SSPI;" + "database=NorthWind";
SqlConnection conn = new SqlConnection(source);
conn.Open();
MessageBox.Show("hello");
conn.Close();
}
}
}
i was getting a strange error message in vs2005
error:
Code:
Error 1 The type 'System.Data.SqlClient.SqlConnection' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll' and 'c:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\System.Data.SqlClient.dll' C:\Documents and Settings\admin\My Documents\Visual Studio 2005\Projects\ConsoleApplication4\ConsoleApplication4\Program.cs 14 13 ConsoleApplication4
can anyone plz help me in debugging program.
(profeesional c#2005, chap 19,pg 583)
thanks
prrao