Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » [solved]when to reconnect to the sql database?
[solved]when to reconnect to the sql database? [message #46643] Tue, 21 June 2016 03:00 Go to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
In my skylark web server app i use mysql server to store data.
the SqlSession didn`t have method such as "IsConnected()" so i can not hold the session
and have no choice but to connect to the server every time Embarassed

[Updated on: Tue, 21 June 2016 09:18]

Report message to a moderator

Re: when to reconnect to the sql database? [message #46644 is a reply to message #46643] Tue, 21 June 2016 06:13 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

akebee wrote on Tue, 21 June 2016 03:00
In my skylark web server app i use mysql server to store data.
the SqlSession didn`t have method such as "IsConnected()" so i can not hold the session
and have no choice but to connect to the server every time Embarassed


Hi akabee,

There is IsOpen() method that probably does exactly what you expected from IsConnected(). Check the docs Wink

Best regards,
Honza
Re: when to reconnect to the sql database? [message #46646 is a reply to message #46644] Tue, 21 June 2016 09:18 Go to previous messageGo to next message
akebee is currently offline  akebee
Messages: 90
Registered: August 2011
Location: China
Member
thank you
dolik.rce
i see Cool
Re: [solved]when to reconnect to the sql database? [message #46647 is a reply to message #46643] Tue, 21 June 2016 19:39 Go to previous message
Zbych is currently offline  Zbych
Messages: 327
Registered: July 2009
Senior Member
akebee wrote on Tue, 21 June 2016 03:00
In my skylark web server app i use mysql server to store data.
the SqlSession didn`t have method such as "IsConnected()" so i can not hold the session
and have no choice but to connect to the server every time Embarassed


You can use global SQL and SQLR and connect to your database when skylark threads are created (just once when your program starts)
Take a look at skylark tutorial - 9. Connecting SQL database
Previous Topic: [solved]crash when execute sql command
Next Topic: grid control hidden field sql accept
Goto Forum:
  


Current Time: Sun Jun 16 08:19:51 CEST 2024

Total time taken to generate the page: 0.01162 seconds