help anyone..

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

C:\Documents and Settings\Yeoh Cheng Lin\My Documents\Visual Studio
Projects\CallBillingSystem\CallBillingSystem\SummaryReport.cs(301): The type
or namespace name 'SqlConnection' could not be found (are you missing a using
directive or an assembly reference?)

may i know what does it means? thanks?
 
Hi Alyssa,

There is nothing in your project that is referencing the
System.Data.SqlClient namespace. Add this line ontop of the file to solve
the problem:

using System.Data.SqlClient;

This is a common error and it is easy to fix. Just use the Documentation
(MSDN/SDK). At the bottom of the page is a link to the namespace. If you
don't have a using statement with that namespace, you will need to use the
full name in your code.

System.Data.SqlClient.SqlConnection conn = new
System.Data.SqlClient.SqlConnection();
 
alyssa,

You need to add a reference to System.Data.dll to your project. Right
click on the "references" folder in your project, and then select
"System.Data.dll" from the list on the ".NET" tab on the dialog that comes
up.

Hope this helps.
 
a line like this will solve your problems:

using System.Data.SqlClient;


cheers,
 
You would also have to add a reference System.Data in the project, if it's
not already there.

--Bob
 
Hi,


IIRC all the projects types defined in VS.NET 2003 include it by default


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Bob Grommes said:
You would also have to add a reference System.Data in the project, if it's
not already there.

--Bob
 
Back
Top