I'm running into a problem where I need to know if I already have a connection to SQL established so I don't waste time opening another connection.
I have several procedure files that are issuing a command like
There are times when the main program also has established a connection to that database, like
The underlying problem is an inconsistent use of the variable to store the handle, but that can't be addressed at this point. We've had several developers in this project over the years and there are probably 20 different variable names referring to multiple databases of differing names.
What I would like to know is if a connection to 'MyDatabase' already exists and how I can tap into it's handle in the various procedure and function files.
Is this possible?
Steve
I have several procedure files that are issuing a command like
Code:
nHandle = SQLCONNECT('MyDatabase')
There are times when the main program also has established a connection to that database, like
Code:
nDBHandle = SQLCONNECT('MyDatabase')
The underlying problem is an inconsistent use of the variable to store the handle, but that can't be addressed at this point. We've had several developers in this project over the years and there are probably 20 different variable names referring to multiple databases of differing names.
What I would like to know is if a connection to 'MyDatabase' already exists and how I can tap into it's handle in the various procedure and function files.
Is this possible?
Steve