MySQL Forums
Forum List  »  Connector/Arduino

Re: Reconnecting to mysql connector
Posted by: Charles Bell
Date: November 06, 2013 06:48AM

I think this may be possible. I don't have time to test it, but here is what I am thinking. Let me know if you get a chance to test it before me.

We need a disconnect() method in the connector. You can add it like this:

void Connector::disconnect()
{
client.stop();
}

Be sure to add it to mysql.cpp and this to mysql.h (in the public area of the class):

void disconnect();

Then, in you code, call my_conn.disconnect() to disconnect and my_conn.connect(...) again to reconnect.

Options: ReplyQuote


Subject
Views
Written By
Posted
15086
November 01, 2013 01:10AM
3979
November 01, 2013 10:22PM
Re: Reconnecting to mysql connector
3678
November 06, 2013 06:48AM
3157
November 06, 2013 09:35AM
3360
November 07, 2013 08:47AM
2906
November 11, 2013 02:03PM
4262
December 18, 2013 01:48PM
3200
December 18, 2013 03:48PM
3248
December 29, 2013 09:48AM
2757
December 30, 2013 03:15PM
2771
December 31, 2013 11:50AM
2968
January 06, 2014 01:59PM
2722
February 04, 2014 03:45PM
2655
February 04, 2014 04:20PM
2865
February 05, 2014 01:15PM
3658
February 05, 2014 02:36PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.