本文介绍了从SQL Server输入文本和ODBC连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我遇到了一种我无法解释的奇怪行为.

我有以下情况.我的后端数据库是SQL Server.在其中一个表中,我有一个文本类型的字段.我有一个通过ODBC链接到表的Access数据库.该字段的类型为备注.我使用CDaoRecordset从C ++应用程序访问该表.

对于某些记录,无法设置备注/文本"字段的字段值.当我使用函数SetFieldValue(),然后调用函数Update时,从DAO收到一条错误消息(错误代码3197):"Microsoft Jet引擎已停止该过程,因为另一个用户已经编辑了记录集."

对于其他记录,执行完全相同的步骤也没问题.

我确定:
*尚未编辑记录的C ++应用程序
*没有其他用户在做任何事情
*通过导入表仅使用MS Access,不会出现错误
*不管该字段是否为空

在Access(链接表和导入表)和SQL Server中查看记录均未显示任何错误.

任何对正在发生的事情有线索的人吗?

关于

Hi,

I have run in to a strange behaviour that I can''t explain.

I have the following scenario. My back-end database is a SQL Server. In one of the tables I have got a field that is of type text. I have a Access database that links to the table through ODBC. The field get the type Memo. I access the table from a C++ application using CDaoRecordset.

For some records it is not possible to set the field value of the Memo/text field. When I make use of the function SetFieldValue() and then call the function Update I get an error message from DAO (error code 3197) "The Microsoft Jet engine has stoppped the process because another user has edited the record set.".

For other records it is no problem doing the exact same procedure.

I''m certain that:
* the C++ app that hasn''t edited the record
* that there are no other users that is doing anything
* using only MS Access, by importing the table, gives no error
* it is irrespective of if the field is empty or not

Looking at the record within Access (both linked and imported table) and SQL Server doesn''t show any error.

Anyone that has a clue on what is happening?

Regards

推荐答案



这篇关于从SQL Server输入文本和ODBC连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 14:57