Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disconnect and Reconnect to a MySQL Database

Status
Not open for further replies.

clarionuser

Programmer
May 15, 2001
1
DE
I developed an application using Clarion 6.3 and MySql Database Version 5.1 with the ODBC Filedriver.
For a special function I want to disconnect from the MySQL server without closing the application.
I determine the ConnectionID with
myfile{prop: sql} = 'select CONNECTION_ID ()'
and close the connection with a subsequent
myfile {prop: sql} = 'kill' & ConnectionID.
All fine !

Now I would like to establish the connection again later. I thought it is enough if I use open(myfile) , but here comes the message "Sql server has gone away '.
I think there must be something more to be done.

Best Regards
 
Hi!

The proper usage is myfile{PROP:Disconnect}. Keep in mind that all tables with the same connection string share the same connection. So, make sure all the tables in the connection are closed before issuing a prop:disconnect.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top