dbTalk Databases Forums  

Connection always on and field names

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


Discuss Connection always on and field names in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ankur G35 Saxena
 
Posts: n/a

Default Connection always on and field names - 07-16-2005 , 09:21 PM






Hi,
I am using mysql++ very lightly..connect to a DB, run a
select/insert/update and use the result set. Now I have 2 things I
want to do...One I want to figure how to keep the connection always on
and be able to check if the connection has disconnected and if so,
then connect to the db again.

Is it a big overhead to keep connecting every 1/2 a sec or so? If
it is then I would like to have this feature where I can probably set
a idle time out and be able to check of the connection is down.

Also how do I get how many filed are returned by a select * from
query. I know how to get how many rows, but the col number and names,
how do I get that?

I have few other questions which I will send in a seperate email once
I am alittle clear as to what I want to do.

Thanks a ton

AS

--
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   
Warren Young
 
Posts: n/a

Default Re: Connection always on and field names - 07-18-2005 , 07:06 AM






Ankur G35 Saxena wrote:
Quote:
I am using mysql++ very lightly..connect to a DB, run a
select/insert/update and use the result set. Now I have 2 things I
want to do...One I want to figure how to keep the connection always on
and be able to check if the connection has disconnected and if so,
then connect to the db again.
Use Connection:ing(). Here's why:

http://dev.mysql.com/doc/mysql/en/mysql-ping.html

Quote:
Is it a big overhead to keep connecting every 1/2 a sec or so?
Are you asking us to guess what the results of your benchmark testing
will be? That's a poor substitute for actually doing the tests...

Quote:
Also how do I get how many filed are returned by a select * from
query. I know how to get how many rows, but the col number and names,
how do I get that?
Look at the value_list() and field_list() member functions. See also
the fieldinf1 and dbinfo examples.

Quote:
I have few other questions which I will send in a seperate email once
I am alittle clear as to what I want to do.
Please avail yourself of the manual first:

http://tangentsoft.net/mysql++/doc/

Two of the questions you've already asked are already addressed there.

--
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.