环境:WindowsXP ; VC++6.0 + sp5 1。通过odbc直接执行SQL语句CDatabase mydb;CRecordset myRecord;CString strSQL;CDBVariant cv;try{if ( !mydb.IsOpen() )mydb.OpenEx("数据库连接字符串",CDatabase::noOdbcDialog);