Hi ,
I'm trying to make an app in vc++ that access my MySQL db and then
email me some data. I'm mailing with winsock. Whenever i email with
winsock then i can't connect with MySQL db(anymore). Here is my
listing:
Smtp smtp("www.mydomain.nl","info","test","in**@mydomai n.nl");
smtp.sendMail("test3","us**@domain.nl","test3");
smtp.closeConnection();
db_MySQL db ("www.mydomain.nl","root","test","algemeen");
Rs_MySQL rs1 (db);
Rs_MySQL rs2 (db);
string sql = "SELECT * FROM `quote properties`";
rs1.get_result(sql);
int amountquoteusers = rs1.num_rows();
The sendmail is going perfect but when i construct db_MySQL object it
fails in the constructor. In the constructer i call mysql_real_connect
and returns an empty MYSQL object. But if the sendmail code is after
the db code then the db connection is succesfull, like this:
db_MySQL db ("www.mydomain.nl","root","test","algemeen");
Rs_MySQL rs1 (db);
Rs_MySQL rs2 (db);
string sql = "SELECT * FROM `quote properties`";
rs1.get_result(sql);
int amountquoteusers = rs1.num_rows();
Smtp smtp("www.mydomain.nl","info","test","in**@mydomai n.nl");
smtp.sendMail("test3","us**@domain.nl","test3");
smtp.closeConnection();
Anyways i'm getting crazyyyyy!
Thx,
Q.