dbTalk Databases Forums  

How do I ping a connection?

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss How do I ping a connection? in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default How do I ping a connection? - 06-26-2006 , 02:10 AM






Hi all,

my app needs a "persistent" connection to the db, so I was thinking to do
something like this

1. connect to the db at program entry
2. before each db access call ping() to check the connection and possibly
reconnect
3. close the connection when the program ends.

The only problem is that I can't access mysqlpp::Connection.ping(), the
linker complains about an unresolved symbol, and in the source code there's
no MYSQLPP_EXPORT in front of ping(), so I guess I shouldn't even try to
call it :-)

What am I doing wrong?

Thanks in advance.
--
Angelo Dipierro - angelo (AT) omniacom (DOT) it

"I love deadlines. I especially love the swooshing sounds
they make as they fly by." [Douglas Adams]



--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw


Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: How do I ping a connection? - 06-26-2006 , 09:20 AM






Angelo Dipierro wrote:
Quote:
I can't access mysqlpp::Connection.ping(), the
linker complains about an unresolved symbol, and in the source code
there's no MYSQLPP_EXPORT in front of ping(), so I guess I shouldn't
even try to call it :-)
That's just an error. You will get exactly the symptom you describe if
you're using Visual C++ and using MySQL++ in a DLL. If that's your
situation, I would just add the MYSQLPP_EXPORT declaration and rebuild
the library. You should also do it for Connection::api_version().

This will be fixed in the next version.

If you're on some other platform, then I'll need more details to know
what's going wrong.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.