VB6.0中的记录集
我正在使用 VB6 从记录集中的数据库检索数据...因此,在使用 SQL 中的 Select 检索数据时,我添加了一个名为 Comments 的列,以便在记录集中,表的所有列+“注释”列都会出现...我不想(而且我不能)更新数据库中的任何内容,因为我只是现在从数据库“获取”数据...
现在,当我传递获取的数据进行验证时,如果记录集中的特定行是错误的,我想用相应的错误填充“注释”列)...当我这样做我收到一条错误消息“我无权这样做!!(更新‘评论’栏”……
现在我的问题是“我可以通过什么方式解决这个问题???”..我尝试复制此记录集,现在填充了“注释”列(在复制的记录集中),这又显示了相同的错误...看来这可能是因为重复的记录集(记录集)只保留了记录集的属性原来的...
你能帮忙解决这个问题吗??? 有什么方法可以复制记录集(不继承其属性)??????
I'm retrieving Data from a Database in a record set using VB6... so while retrieving data using Select in SQL I added a column called Comments along wit it so that in the recordset, all the columns of the table+'Comments' column would be present... I don't want to(and also I cannot) update any contents in the database as i'm only 'fetching' data frm the database now...
Now when i pass the fetched data for validation, I want to fill the 'comments' Column with the respective errors if the particular row in the recordSet is erroneous).... When i do that i get an error saying "I'm not authorized to do that!!(to update the 'Comments' Column"....
Now My Question is "In what way i can solve this problem???".. I tried to replicate this recordset and there by now filling the 'comments'column (in the replicated one) which in turn showed the same error... It seems this could be because the duplicate one(recordSet) just retains the properties of the original one...
Can u any1 help how to solve this???? Any ways to replicate the recordset(without inheriting its properties something)??????
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为您只是问如何执行断开连接的记录集。
为此,您只需更改记录集的光标位置即可。
I think you are just asking how to do a disconnected recordset.
For that you just change the cursor location of the recordset.
不完全是您正在寻找的,但这就是我这样做的方法:
Not exactly what you are looking for, but this is how I do it:
您可以使用 MSDataShape 及其
SHAPE..APPEND
语法将新字段附加到 ADO 记录集。 下面是一个使用 Jet(又名 MS Access)的简单示例:You can use the MSDataShape with its
SHAPE..APPEND
syntax to append a new Field to an ADO Recordset. Here's a quick example using Jet (a.k.a. MS Access):