I'm working on an application that has a slew of database connections throughout. The application is being developed on a system which is 100% disconnected from the server on which it will run. Every time I open a form object or attempt to compile, I have to wait n seconds before the dev environment spits out an error stating the database cannot be found.

The real problem is that there's a single ADO object in the app that has a seemingly infinite waiting time before the error comes up. The error never shows and I consequently, cannot finish the build of the application, nor can I open the form object that contains it. I can change the string by opening the .frm file in notepad, which allows me to open the form object in VB, but it doesn't help when building it.

My question is this: Is there any way to disable the checking of ADO connections during development/build?

6 Years
Discussion Span
Last Post by AndreRet

It seems that the reason it takes time before an error occur is because it is trying to connect to the server. It will automatically try and loop through all connections and ports for the server IP.
Show me any one of the server connection codes. Your problem is contained within this connection. It should move on if the server is disconnected/powered off, which in this case seems it is not doing.


I actually found the issue with this one. Seems someone decided to change the connection timeout of that ADO object to 80000 seconds, which is a bit long. Should have been something easy to find, but I'm not exactly well versed in VB.

Regardless, do you know of any way to stop it from checking the connections? With giving the application a reasonable amount of time to connect to the server, the build process just takes so long because it goes through every connection to see if it's live, waits the 15 seconds, then lets you know the connection is unavailable before moving on to build the rest of the app. It just seems a bit silly to spend 20 minutes to build this app when it should take 20 seconds. Not to mention that you have to sit there and wait for it to error out so you can click ok to let it continue.


If you say "build the app", are you referring to compiling it into an exe?

Are you using the winsock control to do the connection? This method is quite quick, about 3 seconds maximum to determine a connection. It also uses only the winsock and ip to listen for a connection, eliminating all other ports not set.


Yes, I'm referring to compiling, but the issue also occurs when opening a form object.

The controls are of the Adodc type.


Its not suppose to give errors on a ado connection contained within the application, only when you run the app. It might be that you have a reference to something missing in the code, hence the error.

What is the error you get, description and/error number?


[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL server does not exist or access denied.

That's all it gives me. Not a show stopper, but a pain in the rear regardless.

Edited by Sodabread: n/a


This explains most of it. It is trying to copy the sql server reference files which seem to be installed on the server. Copy these files from the server and include them in your application. This should solve your problem, I hope.:)

I still can't get it to work, but your help deserves a rep boost.
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.