tiger");
下面的代码对Customers数据库表执行一个SQL命令,返回给定ID的客户的信息:
char cmd[1024];
sprintf(cmd , "SELECT COMPANYNAME , CONTACTNAME ,
CONTACTTITLE , ADDRESS FROM CUSTOMERS WHERE CUSTOMERID = ''%s''" , m_id );
const char *p ;
bool ret = db_com_ptr->ExecuteSelectCommand(cmd);
if ( ! db_com_ptr->NextRow() ) return ;
_bstr_t mData = db_com_ptr->GetColumnData(3);
p = mData ;
m_address = (CString)p ;