Groups | Blog | Home
all groups > sql server connect > october 2004 >

sql server connect : SQL Server 2000 connection problem - dbmssocn work in Excel 2k but not XP


dengcharles NO[at]SPAM hotmail.com
10/14/2004 5:06:18 PM
Hi All,

An interest question about "Network Library=dbmssocn" in connection
string.

I have a Excel VBA application which I used to connect to SQL Server
2000 server. my connection string is:
"Provider=SQLOLEDB; Data Source=servername; Initial Catalog=dbname;
User ID=username; Password=pwd; Network Library=dbmssocn"

This string worked perfectly in Excel 2000, but after I update to
Excel XP, I got the following error message

[DBNETLIB]connectionOpen(Connect()) SQL Server does not exist or
access denied.

After I delete the above "Network Library=dbmssocn" info, it works
again. I look online but can't find answer. Can anybody tell me why? I
am using WinXP.

Kind Regards,

Sue Hoegemeier
10/17/2004 8:35:04 PM
Dbmssocn is the old TCP/P network library. Dbnetlib is the
new TCP/IP network library. Your MDAC versions probably
changed with the update to Excel XP.

-Sue

On 14 Oct 2004 17:06:18 -0700, dengcharles@hotmail.com
[quoted text, click to view]
dengcharles NO[at]SPAM hotmail.com
10/18/2004 7:39:16 PM
Hi Sue,

Thank you for interest to my quiz.

No, "Dbnetlib" is not the only issue in my shoes.
1) My problem was caused by DNS server problem - I connect to a remote
SQL Server 2000 in an intranet environment, in my local machine, after
I add the following line in "C:\Windows\system32\drivers\etc\host"
file
20.230.193.48 mydbservername
I have not problem at all with both "dbmssocn"/"dbnetlib"
2) Interested thing is:
If I use "dbnetlib" and DO NOT add "20.230.193.48 mydbservername" in
"host" file, my program sometimes don't work (first run), and works
perfectly after that.
Of course if I use "dbmssocn" and DO NOT add "20.230.193.48
mydbservername" in "host" file, my program will never work (Error
message "SQL Server does not exist or access denied")

I am confused by "dbnetlib" behavior.

Thanks again


[quoted text, click to view]
rx330 NO[at]SPAM online.nospam
10/20/2004 2:32:36 PM
I have similar problem that occurs after I installed XP SP2. My program
start to throw "[DBNETLIB][ConnectionOPen (Connect()).]SQL Server does not
exist or access denied"
If I switch to name piped it works fine but my client net work only use
TCP/IP. I will try your DNS/Host file entry to see if this resolve this
problem.
Any other suggestion is welcome because I need to have this resolve soon...
Thanks,
Vinh,

[quoted text, click to view]

rx330 NO[at]SPAM online.nospam
10/25/2004 9:15:35 AM
After further testing it's the DBNETLIB that works and the dbmssocn will not
work. So the question would be how to find out which driver to use?
by ADO version or OS version? if so anyone have a suggestion on how to
detect what ADO version is running on the machine in Delphi code?
Thanks,
Vinh,

[quoted text, click to view]

Sue Hoegemeier
10/26/2004 8:40:15 AM
Yes...that would be correct. One option would be to check the MDAC
version by checking the registry and the value of the "Version" string
in the HKLM\Software\Microsoft\DataAccess key.
It contains the version number of the installed MDAC.

-Sue

[quoted text, click to view]
AddThis Social Bookmark Button