Connection Problem

  • Thread starter Thread starter Jim Heavey
  • Start date Start date
J

Jim Heavey

Hello, using the VS.Net to configure my dataAdapter, Dataset and connection
with the intent of using the "connection string" generated to build my own
dataset, dataAdapter and connection.

Using the IDE, I am able to successfully preview the data extracted just
fine, so I know that I must have a good connection string.

I cut and paste that connection string into my program, but when I run, it
tries to use my internet connection to find the server and then generates
and exception saying that "SQL Server does not exist or access denied.".
How can this be? My server is local on my machine, why would it be trying
to go out on the internet to resolve the address? Here is my connection
string that I paster in....

data source=fred\vsdotnet;initial
catalog=SkatingResults;password=XXXX;persist security info=True;user
id=YYYYYYY;workstation id=FRED;packet size=4096
 
Now that give me an exception when I instatiate the SqlCommand object.

The problem appears to be that my connection string has a "\" in the
string. I changed this to "\\" and then it worked just fine.
 
Back
Top