JSL - Save Database() leaves a database connection open - can this be closed?Hi all,
I've been trying different things for a while now and can't figure it out. In JSL, the Save Database() command appears to leave a database connection open. Since there isn't a handle to it, I can't figure out how to close the connection. Is there a way to close this connection?
thanks,
Hyde
Re: JSL - Save Database() leaves a database connection open - can this be closed?Hyde,
Did you open the connection?
If so, you could use Close Database Connection( databaseConnectionHandle );
Which database and version are you using?
@bryan_boone
Re: JSL - Save Database() leaves a database connection open - can this be closed?I'm aware of the Create Database Connection() and Close Database Connection() commands. However, Save Database() appears to make it's own connection, even if one is already established via Create Database Connection().
I'm using MS SQL Server 2014 on my local machine.
Re: JSL - Save Database() leaves a database connection open - can this be closed?Hyde,
Ok got it.
I'm not sure if a connection pool is established with one of the commands but it (save database () ) should close the connection assuming only one connection is active. Perhaps there is a stale connection left behind from the connection pool via another command.
Stan
Re: JSL - Save Database() leaves a database connection open - can this be closed?Yeah, I thought of that too and single stepped through the program. There is no connection prior to Save Database() and one left hanging after it. Another way around it would be to get a list of open database connections. However, I didn't find any JSL that provided that information. I also tried to trick Save Database() into providing a handle to the connection but nothing I tried worked.
Re: JSL - Save Database() leaves a database connection open - can this be closed?Hyde,
It looks like there is a connection pooling option in the ODBC driver.
Might want to take a look at the driver and ensure ConnectionPooling is set to false (0).
Stan
Re: JSL - Save Database() leaves a database connection open - can this be closed?Thanks for the suggestion but it doesn't appear to make a difference. I set it to and it still leaves a session hanging. By the way, I'm using ODBC Driver 11 for SQL Server. Is this what you use?