int flag=0;
double change=0,presure=0;
tm=time.Format("%Y-%m-%d %H:%M:%S"); CDatabase m_database;
TRY
{
m_database.Open("dbat" );
CString str;
for(int x=0;x<ChannelNum;x++)
{
for(int y=0;y<PointNum[x];y++)
{
str.Format("insert into 测量值 VALUES('%s','%d','%d','%f','%f','%f','%f','%d')",tm,x,y,pt[x][y].Wave,pt[x][y].T,change,presure,flag); m_database.ExecuteSQL(str);
}
}
}
CATCH(CDBException, e)
{
// The error code is in e->m_nRetCode
CString msg;
msg=e->m_strError;
int i=1;
m_database.Close();
}
END_CATCH
m_database.Close();
我用这段代码存储串口采集的数据
可系统运行十几个小时后出现错误!客户端的工作过多。
State:08004,Native:-1036,Origin:[Microsoft][ODBC Microsoft Access 驱动程序]驱动程序的 SQLSetConnectAttr 失败
State:IM006,Native:0,Origin:[Microsoft][ODBC 驱动程序 管理器]
请问这是为什么!!!,怎样解决!
double change=0,presure=0;
tm=time.Format("%Y-%m-%d %H:%M:%S"); CDatabase m_database;
TRY
{
m_database.Open("dbat" );
CString str;
for(int x=0;x<ChannelNum;x++)
{
for(int y=0;y<PointNum[x];y++)
{
str.Format("insert into 测量值 VALUES('%s','%d','%d','%f','%f','%f','%f','%d')",tm,x,y,pt[x][y].Wave,pt[x][y].T,change,presure,flag); m_database.ExecuteSQL(str);
}
}
}
CATCH(CDBException, e)
{
// The error code is in e->m_nRetCode
CString msg;
msg=e->m_strError;
int i=1;
m_database.Close();
}
END_CATCH
m_database.Close();
我用这段代码存储串口采集的数据
可系统运行十几个小时后出现错误!客户端的工作过多。
State:08004,Native:-1036,Origin:[Microsoft][ODBC Microsoft Access 驱动程序]驱动程序的 SQLSetConnectAttr 失败
State:IM006,Native:0,Origin:[Microsoft][ODBC 驱动程序 管理器]
请问这是为什么!!!,怎样解决!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货