View Single Post
  #4 (permalink)  
Old February 5th, 2004, 04:56 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

From what Chapter is this code? This doesn't look right. You'll need to exchange the "Initial File Name" with a Data Source (the server). You may want to send this to Wiley Tech Support, so they can add this to the errata section for the book.

To find out the name of your MSDE installation, go to your program files folder and then look in the Microsoft SQL Server folder. You'll see a folder name with a $ in its name. The part after the $ is the instance name of your MSDE installation. For example, mine is at:

D:\Program Files\Microsoft SQL Server\MSSQL$VSDOTNET

so my MSDE instance is called VSDOTNET. To connect to the MSDE you'll need to use MachineName\InstanceName. Both parts are required. So, in my case, that would be MyServer\VSDOTNET

Mu connectionstring for the Northwind database should then look like this:

Provider=sqloledb;Data Source=MyServer\VSDOTNET;Initial Catalog=NorthWind;User Id=myUsername;Password=myPassword

for an MSDE installation with SQL Server Authentication. For Integrated Security, you should use:

Provider=sqloledb;Data Source=MyServer\VSDOTNET;Initial Catalog=NorthWind;Integrated Security=SSPI

One of these two connection string should work. If they don't, take a look here: http://support.microsoft.com:80/supp.../Q264/6/91.ASP. It will help you create a connection string with a UDL file.

Cheers

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.