代码如下: try
{
CString strSql;
strSql.Format("select * from flow where ID=%s",flowID);
BSTR bstrSQL = strSql.AllocSysString ();
db.m_pRecordset->Open(bstrSQL,(IDispatch*)db.m_pConnection,adOpenDynamic,adLockOptimistic,adCmdText);
while (!db.m_pRecordset->adoEOF)
{
db.m_pRecordset->Fields->GetItem(_variant_t("USING"))->Value=used;
db.m_pRecordset->Update();
db.m_pRecordset->MoveNext();
}
db.m_pRecordset->Close();
}
catch(_com_error e)
{
AfxMessageBox(e.Description());
}数据表中USING是NUMBER类型,请问怎么将int型的used数据加入该字段中
主要是这句:db.m_pRecordset->Fields->GetItem(_variant_t("USING"))->Value=used;应该怎么写?
谢谢!
{
CString strSql;
strSql.Format("select * from flow where ID=%s",flowID);
BSTR bstrSQL = strSql.AllocSysString ();
db.m_pRecordset->Open(bstrSQL,(IDispatch*)db.m_pConnection,adOpenDynamic,adLockOptimistic,adCmdText);
while (!db.m_pRecordset->adoEOF)
{
db.m_pRecordset->Fields->GetItem(_variant_t("USING"))->Value=used;
db.m_pRecordset->Update();
db.m_pRecordset->MoveNext();
}
db.m_pRecordset->Close();
}
catch(_com_error e)
{
AfxMessageBox(e.Description());
}数据表中USING是NUMBER类型,请问怎么将int型的used数据加入该字段中
主要是这句:db.m_pRecordset->Fields->GetItem(_variant_t("USING"))->Value=used;应该怎么写?
谢谢!
解决方案 »
- WinAPI 或 com: 有哪些函数可以办到 "数值 转 字符"
- 去除html标记
- 请问如何创建一个DLL无进程的线程
- (在线等待,急!)在vc中怎么使用datagrid控件 我使用的是odbc访问数据库
- 请问:关于对话框里的图片控件的问题
- getsockname返回错误
- Merrychristmas to all of programmers of China!
- debug assertion failed line 993
- 编写学生信息管理系统,还差发送学生信息这块没有实现,不知道如何实现,求指教?
- 使用getqueuedcompletionstatus时不阻塞,返回的错误码为998
- 如何将ComboBox的选择项传递到List中去
- 问个深度图片问题?怎么有一个图片得到显示区域,并把图片色彩可以变色,就像QQ的换肤一样,不同色彩就有不同的显示方式,担是色彩会根据图片自动调节
改成:long used = 10;
db.m_pRecordset->PutCollect("USING",_variant_t(used));