472,958 Members | 2,580 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

Connection String/Network Library

We've had a recurring problem where all of a sudden we get a DBMSSOCN
General Network Error on any page that connects to SQL Server. Then we have
to reboot the server and everything works fine again, for a few more hours
and then we have the same problem. Someone suggested adding ";Network
Library=DBMSSOCN" to our connection strings. I've tried to figure out
exactly what this does and why not having it would be a problem. Any ideas?
Thanks.
Jul 22 '05 #1
4 6710
Building your connection string
http://www.darkfalz.com/1059

Beyond that it's most likely NOT the connection string, its either the
network communications, unclosed connections, etc.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"James" <le********@verizon.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
We've had a recurring problem where all of a sudden we get a DBMSSOCN
General Network Error on any page that connects to SQL Server. Then we
have
to reboot the server and everything works fine again, for a few more hours
and then we have the same problem. Someone suggested adding ";Network
Library=DBMSSOCN" to our connection strings. I've tried to figure out
exactly what this does and why not having it would be a problem. Any
ideas?
Thanks.

Jul 22 '05 #2
The only reason I tend to think it's the connection string is that we've
been pretty diligent about closing connections and we were connecting with
DSNs up until recently without problem. I'll build a connection string this
way and see how it goes.

Thanks
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:OL*************@TK2MSFTNGP11.phx.gbl...
Building your connection string
http://www.darkfalz.com/1059

Beyond that it's most likely NOT the connection string, its either the
network communications, unclosed connections, etc.

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"James" <le********@verizon.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
We've had a recurring problem where all of a sudden we get a DBMSSOCN
General Network Error on any page that connects to SQL Server. Then we
have
to reboot the server and everything works fine again, for a few more hours and then we have the same problem. Someone suggested adding ";Network
Library=DBMSSOCN" to our connection strings. I've tried to figure out
exactly what this does and why not having it would be a problem. Any
ideas?
Thanks.


Jul 22 '05 #3
James wrote:
We've had a recurring problem where all of a sudden we get a DBMSSOCN
General Network Error on any page that connects to SQL Server. Then
we have to reboot the server and everything works fine again, for a
few more hours and then we have the same problem. Someone suggested
adding ";Network Library=DBMSSOCN" to our connection strings. I've
tried to figure out exactly what this does and why not having it
would be a problem. Any ideas? Thanks.

If you are not using explicit connection objects, you could be disabling
connection pooling
http://support.microsoft.com/?kbid=271128
whch floods your sql server with excess connection, causing it to fail to
respond:
http://support.microsoft.com/?kbid=328476
Do not use this syntax:

set rs=createobject("adodb.recordset")
rs.Open strSQL, strConnectString ...

Do this instead:

set cn=createobject("adodb.connection")
cn.Open strConnectString
set rs=createobject("adodb.recordset")
rs.Open strSQL, cn ...

Another possible gotcha would be:
set cn=createobject("adodb.connection")
cn.Open strConnectString
set rs=createobject("adodb.recordset")
rs.ActiveConnection=cn
rs.Open strSQL

Without the use of the "set" keyword, you are causing a new implict
connection to be created instead of utilizing the already-open cn connection
(remember, the default property of a connection object is its ConnectString.
Without "set", the vbscript compiler thinks you want the default property,
not the object itself, so it uses that ConnectString to create a new
implicit connection behind the scenes).
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #4
Ahh, thank you. I don't believe we ever use any of the syntaxes you
mentioned, but I will definitely look into that, as I'm not responsible for
coding all pages.

This error happened about an hour ago. There were two connection objects on
a particular page, with the exact same connection string, aside from the
DBMSSOCN aspect. Before this line was added, the error occurred on the
opening of the first connection object. The first connection object was
then changed to reflect that DBMSSOCN, while the second one was accidentally
overlooked. When the error occurred this time, the first connection did not
error, but the second one did.

The page didn't need two connection objects to the same database anyway, so
that's been fixed...but the fact that the first connection didn't error is
giving me a glimmer of hope. Perhaps I'm just grasping for any hope I can
find here, heh.

Thanks for the assistance thus far...it's much appreciated.

James

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
James wrote:
We've had a recurring problem where all of a sudden we get a DBMSSOCN
General Network Error on any page that connects to SQL Server. Then
we have to reboot the server and everything works fine again, for a
few more hours and then we have the same problem. Someone suggested
adding ";Network Library=DBMSSOCN" to our connection strings. I've
tried to figure out exactly what this does and why not having it
would be a problem. Any ideas? Thanks. If you are not using explicit connection objects, you could be disabling
connection pooling
http://support.microsoft.com/?kbid=271128
whch floods your sql server with excess connection, causing it to fail to
respond:
http://support.microsoft.com/?kbid=328476
Do not use this syntax:

set rs=createobject("adodb.recordset")
rs.Open strSQL, strConnectString ...

Do this instead:

set cn=createobject("adodb.connection")
cn.Open strConnectString
set rs=createobject("adodb.recordset")
rs.Open strSQL, cn ...

Another possible gotcha would be:
set cn=createobject("adodb.connection")
cn.Open strConnectString
set rs=createobject("adodb.recordset")
rs.ActiveConnection=cn
rs.Open strSQL

Without the use of the "set" keyword, you are causing a new implict
connection to be created instead of utilizing the already-open cn

connection (remember, the default property of a connection object is its ConnectString. Without "set", the vbscript compiler thinks you want the default property,
not the object itself, so it uses that ConnectString to create a new
implicit connection behind the scenes).
HTH,
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Luis | last post by:
I'm using a connection string in my asp pages similar to: cst = "Provider=SQLOLEDB;Server=MyServerName;Database=MyDbName;" cst = cst & "Network Library=DBMSSOCN;User ID=MyUserid;Password=MyPass"...
18
by: middletree | last post by:
Sorry for the crosspost (I posted this on the asp.db group last night). But since I had no answer there, I'm hoping for better luck here. I'm pretty much tried everything I know. Here's the...
2
by: rmartin | last post by:
I need to conect my software from a remote client to a server, my standard connection: Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=;Initial Catalog=MyDb;Data...
1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
5
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
1
by: Grisha0 | last post by:
Hi, i'm trying to connect to a datbase across my LAN. i'm using a standard connetion string... although i got error.. sorry for my english.. best regards grisha ...
5
by: Dave Dudley | last post by:
Hi, I have a new ASP .Net project that has been developed on our development machine and connects to SQL Server 2000 on the same machine. It is connecting via a connection string similiar to:...
5
by: Al | last post by:
Hi, Is there any way to detected if a device is connected? How would I query to see the device is connected to network. My application is mobile and mostly on wireless connection but it could be...
5
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.