下面这段代码编译通过,运行时出现错误Idispatch error #3092,是什么原因?
void CRsCgDlg4::OnBtnjudge()
{
UpdateData();
// TODO: Add your control notification handler code here
//method one
CString str1=m_strDlgselansewer;
CString str2=m_strDlganswer;
if(str1.Compare(str2)!=0)
{
CString sql_;
sql_.Format("UPDATE TestResult_VIEW SET rusult='错' where quno='%s'",m_strDlgquno);
_bstr_t strSQL=sql_;
try
{
m_DBCnt->Execute(strSQL,NULL,adCmdText);
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
return;
}
RefreshBoundData();
}
else
{
rightnumber++;
CString sql_;
sql_.Format("UPDATE TestResult_VIEW SET rusult='对' where quno='%s'",m_strDlgquno);
_bstr_t strSQL=sql_;
try
{
m_DBCnt->Execute(strSQL,NULL,adCmdText);
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
return;
} RefreshBoundData();
}
UpdateWindow();
}
其中m_strDlgselansewer和m_strDlganswer是视图TestResult_VIEW中的对应字段(字符型)在对话框中的变量,这段代码我想将这两个字段的内容进行比较,并把比较之后所得结果放在视图中对应的字段result中,m_DBCnt 为连接指针,其初始化代码如下:m_DBCnt.CreateInstance(__uuidof(Connection));
CString sql_;
sql_.Format("DSN=ConKnow;UID=sa;PWD= ");
_bstr_t sql=sql_;
m_DBCnt->Open(sql," "," ",-1);
void CRsCgDlg4::OnBtnjudge()
{
UpdateData();
// TODO: Add your control notification handler code here
//method one
CString str1=m_strDlgselansewer;
CString str2=m_strDlganswer;
if(str1.Compare(str2)!=0)
{
CString sql_;
sql_.Format("UPDATE TestResult_VIEW SET rusult='错' where quno='%s'",m_strDlgquno);
_bstr_t strSQL=sql_;
try
{
m_DBCnt->Execute(strSQL,NULL,adCmdText);
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
return;
}
RefreshBoundData();
}
else
{
rightnumber++;
CString sql_;
sql_.Format("UPDATE TestResult_VIEW SET rusult='对' where quno='%s'",m_strDlgquno);
_bstr_t strSQL=sql_;
try
{
m_DBCnt->Execute(strSQL,NULL,adCmdText);
}
catch(_com_error& e)
{
AfxMessageBox(e.ErrorMessage());
return;
} RefreshBoundData();
}
UpdateWindow();
}
其中m_strDlgselansewer和m_strDlganswer是视图TestResult_VIEW中的对应字段(字符型)在对话框中的变量,这段代码我想将这两个字段的内容进行比较,并把比较之后所得结果放在视图中对应的字段result中,m_DBCnt 为连接指针,其初始化代码如下:m_DBCnt.CreateInstance(__uuidof(Connection));
CString sql_;
sql_.Format("DSN=ConKnow;UID=sa;PWD= ");
_bstr_t sql=sql_;
m_DBCnt->Open(sql," "," ",-1);
解决方案 »
- 请教各位,关于红蓝立体图片制作和去除像素某色分量的问题?
- 做一个搜索功能,easySearch类型比如输入前面后面自动显示出来的
- 如何向dll中传递自定义结构体作为函数参数
- osborn(SEANX):进来领分!
- 当我编辑一个程序外的.res文件时,FindResource中的第一个参数 HMODULE hModule如何指定?
- windows ap如何i调用Cult3D插件的接口函数
- 请问大侠:获取摄像头视频的接口函数的是什么哦
- 为什么路径不能保存到我的config.ini文件中,请教指点!!
- 请问cs.style |= (WS_CLIPCHILDREN|WS_CLIPSIBLINGS)是什么意思???(主要是两个参数)
- 类型转换!
- 如何在vc下连接一个.asm文件?
- 请问用COM编写一个有插件(toolbar)功能的程序
'对'‘T'DWORD dw=GetLastError()
Commerce Server 2000 Service Pack
来安装看能不能解决问题:SYMPTOMS
When you import a catalog in a Data Warehouse Data Transformation Services (DTS) task, you may receive the following error message:
Error -2147217900 Msg: Idispatch error #3092 Description: There is already an object named '#CatTmp' in the database
CAUSE
When you import the catalog, the dynamic Structured Query Language (SQL) in the dynamic-link library (DLL) creates a temporary table named #CatTmp, but does not detect the catalog and does not drop the catalog correctly for later use if the user is not a Database Owner (DBO).
RESOLUTION
To resolve this problem, obtain the latest service pack for Commerce Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
297216 INFO: How to Obtain the Latest Commerce Server 2000 Service Pack The English version of this fix should have the following file attributes or later: Date Time Size File name
----------------------------------------
16-Apr-2002 15:40 525KB Cdtstasks.dll
STATUS
Microsoft has confirmed that this is a problem in Microsoft Commerce Server 2000. This problem was first corrected in Commerce Server 2000 Service Pack 3 (SP3).
2, 要更新的字段不能被更新