CodePudding user response:
Why create ODBC ADO recordset objectCodePudding user response:
G_pRS global? Into a local variable, to release after useCodePudding user response:
See what mistakes or add exception handlingtry
{
//your ADO code
}
The catch (_com_error & amp; E)
{
Cstrings strMsg;
StrMsg. The Format (_T (" error description: % s \ n error message % s "),
(LPCTSTR) e.D escription (),
(LPCTSTR) e.E rrorMessage ());
AfxMessageBox (strMsg);
}
CodePudding user response:
To connect to the MySQL database using MySQL Connector/C is more convenient,There is a ready-made:
http://www.allmai.net/? CTRL=detail& Method=note& Id=10 & amp; Typename=note
CodePudding user response:
MFC under the vc + + ADO access to connect the MySQL database to add delete modify database