![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
---------- Message d'origine = ----------- Exp=E9diteur : Warren Young <mysqlpp (AT) etr-usa (DOT) com A : M= ySQL++ Mailing List <plusplus (AT) lists (DOT) mysql.com CC : Date : Thu, 18= Aug 2005 10:00:23 -0600 Objet : Re: V2.0.1 & VS2003/2005 qry=3Dnew Qu= ery(con) =3D> conn inside queryout ... np (AT) sfr (DOT) fr wrote: Qry objec= t does not contain a correct conn_ pointer. That's not very helpfu= l. What makes you think it is not valid? Is it valid right after yo= u create the Query object? At what point does it become invalid? = PS : i'm not able to run 'makemake vc', Sorry, make.bat was= accidentally left out of the distribution. I've attached the curren= t version. I am sending this to the mailing list. Please do not e= mail me directly. This sort of thing belongs on the mailing list, w= here others can benefit from this exchange. Code : = try { con =3D new Connection(use_exceptions); con->conne= ct(DB_NAME,DB_HOST,DB_USER_NAME,DB_PASSWORD); if(con!=3DNULL) { = qry =3D new Query(con); a "standalone" usable class } = if(con =3D=3D NULL || con->connected()=3D=3Dfalse) { Log::A= ddLog("ERROR Connection failed to MYSQL Server"); return false;= } } catch (BadQuery er ) { Log::AddLog("ERROR whi= le connecting to MYSQL Server" + String(er.what())); return false;= } return true; That looks perfectly reasonable to me.= What part of it fails? Liste des noms de fichiers de corps = |
![]() |
| Thread Tools | |
| Display Modes | |
| |