problems disconnecting databases

geoffconnolly

New Member
Hi
has anybody here had problems with database disconnects in v9.1d
I have programs where i need certain databases connected for certain processes and then disconnected
I am running a subprogram to connect
and a sub program to disconnect
although the database seems to be disconnecting
the program is behaving as if it isnt
do i need to put in a pause or something ???
 
Not really. The disconnect statement is just a request. Progress will not actually perform the disconnect while there are procedures running that access the database. It waits until those procedures have ended.

If there are no procedures running that access the database, then the disconnect should work immediately. If you are using persistent procedures that access the database, then shut them down first. That includes ADM procedure if you are using SmartObjects.
 

geoffconnolly

New Member
Hi Mike
Its actually a transaction scope issue
the connected(DBNAME) function is returning a false result
but if i run the following
for each DBNAME._file:
display DBNAME._file._file-name.
end.
I get a list of tables on the database.
shortening my transaction blocks sorts this out.
Its obviously only partly disconnecting the database.









Mike Carroll said:
Not really. The disconnect statement is just a request. Progress will not actually perform the disconnect while there are procedures running that access the database. It waits until those procedures have ended.

If there are no procedures running that access the database, then the disconnect should work immediately. If you are using persistent procedures that access the database, then shut them down first. That includes ADM procedure if you are using SmartObjects.
 

wrpkm

New Member
Software Developer

One little thing that I ran into a while back is that if you define a variable using the like qualifier then the database must stay open, so when I was trying to close the database it would say that it closed but I could not open another similiar database as conflicts would occur.

Make sure that you are not referencing any variables using "like".

Bill.
 
Top