Question : ODBC--connection to 'xxx' failed. (error #3151)

ODBC--connection to 'xxx' failed. (error #3151)

Answer : ODBC--connection to 'xxx' failed. (error #3151)

Establishing a good connection involves many variables.  Here are a few places to look (and things to consider):

Has the application ever connected? if so, what has changed since then?

Is your registerd Data Source Name (DSN) properly defined through the ODBC manager?

Is (was) your physical link operting normally at the time? (Examine activity lights, etc)

Did high levels of activity use up all the connections? (does your app never connect, or just not connect some times)

Check your support libraries of .DLL/.VBX/.OCX for correct versions or duplicates.  Have you loaded ODBC drivers from anywhere lately?

Is it a Microsoft network using named pipes? then you should look for:( in system directory)

VB3 and 5.0VBSQL: W3DBLIB.DLL, DBNP3.DLL
VB4 and 5.0(16 bit): MSDBLIB3.DLL,DBNMP3.DLL
VB4 and 5.0(32bit): NTWDBLIB.DL, DBNMPNTW.DLL

Can you map (have you) to a shared drive on the file server?

Run out of users on the host server?

Do you have LAN permission to access the file server?

On SQL Server:
Improper SQL logon ID or password? or if proper, do you have appropriate permission?

Is (was) the server running?

Has the database been impoperly restored, causing problems with permissins, logon ids, and passwords?

Running out of space on (RAM or disk) on host server?

Server in single user mode for maintenance?

Are you a valid user on the host server (NT)?

Run out of licensed connections?

As you can see, there are many possibilities for a connection not completing, many I'm sure are not mentioned here.  But if you check out all of the above, outside of someone stealing your server and taking it home to play Donkey Kong, you should be able to find your problem.
Random Solutions  
 
programming4us programming4us