I have used the following format successfully (watch for word wrap - should
all be on one line):

"initial catalog=MyDbName;data
source=MyServerName\MyNamedInstance;uid=MyUid;pwd=Mypassword;"

My example is from VB.NET, so the escaped backslash is not required.

>SqlConnection conn = new SqlConnection("user id=jedi;password=yoda;initial
>catalog=pubs; data source=hoth\\projectx;");

Following my format, try:
"initial catalog=pubs;data source=hoth\\projectx;uid=jedi;pwd=yoda;"

Cheers,
Martin

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to