Subject: Can't Reference System.Data.dll (ch 2, ex 1)
Posted By: Moonpile Post Date: 12/28/2006 12:21:18 PM
I've right clicked on my project in Solution Explorer and selected "Add Reference", but in the ".Net" tab there is no entry for "System.Data.dll" for me to select!

My project does not fill the list box, and I've even tried the downloaded example and it doesn't work either.

Any ideas why I don't seem to have System.Data.dll and how I might be able to get it?

Thanks!

Reply By: Moonpile Reply Date: 12/28/2006 12:26:46 PM
Well, duh.  Access was still open, and now the project works perfectly!

However, I still don't have an entry for System.Data.dll to add to references.  Any ideas?

Reply By: Thearon Reply Date: 12/30/2006 5:37:18 AM
In the Add Reference dialog, click on the .NET tab and scroll down until you see System.Data. System.Data.dll is the actual name of the file and I may have confused you on this.

Thearon
Reply By: Moonpile Reply Date: 12/30/2006 10:57:04 AM
Thanks!

Later on in the book it's clearer.  What's the difference between referencing System.Data and importing it in the code?


Reply By: Thearon Reply Date: 1/8/2007 1:44:56 PM
The book was written against the pre-release version of Visual Studio 2005 and that version did not automatically reference the System.Data.dll. The release version does however so you really don't need to set a reference to it or import it. Importing the System.Data namespace just prevented you from having to prefix the classes in that namespace with the fully qualified namespace (e.g. DataSet would have to be System.Data.DataSet without the imports statement).

This has all been fixed in the released version of Visual Studio 2005.

Thearon

Go to topic 54257

Return to index page 70
Return to index page 69
Return to index page 68
Return to index page 67
Return to index page 66
Return to index page 65
Return to index page 64
Return to index page 63
Return to index page 62
Return to index page 61