void CTest1View::OnInitialUpdate() 
{
CView::OnInitialUpdate();

// TODO: Add your specialized code here and/or call the base class
HRESULT hr=S_OK;
hr=::CoInitialize(NULL);
try
{
hr=m_connection.CreateInstance(__uuidof(Connection));
if(SUCCEEDED(hr))
hr=m_connection->Open("DSN=myodbc;","","",0);
if(SUCCEEDED(hr))
m_fConnected=TRUE;
else
m_fConnected=FALSE;
m_connection->CommandTimeout=5;
}
catch(_com_error e)
{
MessageBox(e.ErrorMessage());
m_fConnected=FALSE;
}
if(!m_fConnected)
MessageBox("ADO数据源初始化失败!");
}我连mysql数据库的代码。/*_variant_t RecordsAffected;
CTest1Doc* pDoc=GetDocument();
char* s=new char[10];
this->m_connection->Execute("drop table if exists 'test'.'bitmapinfo'",&RecordsAffected,adCmdText);
this->m_connection->Execute("create table 'test'.'bitmapinfo'(ID int(10) unsigned not null auto_increment,NameIndex int(10) unsigned,Centerx int(10) unsigned,Centery int(10) unsigned,Height int(10) unsigned,Width int(10) unsigned,m_strIP char(16),PRIMARY Key('ID') )",&RecordsAffected,adCmdText);
this->m_connection->Execute("insert into bitmapinfo(NameIndex,Centerx,Centery,Height,Width,m_strIP)  values (0,0,0,0,0,'0')",&RecordsAffected,adCmdText);
for(int i=0;i<pDoc->BitmapNum;i++)
{
char SQLString[500]="insert into bitmapinfo(NameIndex,Centerx,Centery,Width,Height,m_strIP) values (";
s=itoa(pDoc->pBitmapInfo[i].nameindex,s,10);  //10表示s是10进制
strcat(SQLString,s);  
strcat(SQLString,",");    //加入NameIndex s=itoa(pDoc->pBitmapInfo[i].CenterPt.x,s,10);  
strcat(SQLString,s);  
strcat(SQLString,",");    //加入CenterPt.x s=itoa(pDoc->pBitmapInfo[i].CenterPt.y,s,10);  
strcat(SQLString,s);  
strcat(SQLString,",");    //加入CenterPt.y s=itoa(pDoc->pBitmapInfo[i].width,s,10);  
strcat(SQLString,s);  
strcat(SQLString,",");    //加入Width s=itoa(pDoc->pBitmapInfo[i].height,s,10);  
strcat(SQLString,s); 
strcat(SQLString,","); //加入Height strcat(SQLString,"'");
strcat(SQLString,pDoc->pBitmapInfo[i].strIP);
strcat(SQLString,"'");  
strcat(SQLString,")");
this->m_connection->Execute(SQLString,&RecordsAffected,adCmdText);
}
delete [] s;我保存数据的代码,编译运行没问题,一保存就显示Runtime error
怎么办啊!新手求教。