怎样修改记录集里的内容?急急急,在线等前辈们帮忙!!!

accpt25 2005-10-24 10:26:06
Set temp = New Connection
Set temppub = New Recordset
temp.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=xiaocao;Data Source=."
temp.Execute "select * from dp"
temppub.Open "dp", temp, adOpenDynamic, 3
下面该怎么写啊?
我晕了......
...全文
70 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
winehero 2005-10-24
  • 打赏
  • 举报
回复
Set temp = New Connection
Set temppub = New Recordset
temp.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=xiaocao;Data Source=."
temp.Execute "select * from dp"
temppub.Open "dp", temp, adOpenDynamic, 3
下面该怎么写啊?
我晕了......
___________________________________________________________________________

if temppub.eof or temppub.bof then exit sub
'修改第一条记录:
temppub.movefirst
temppub.fields(0)=... '修改第一个字段
temppub.fields(1)=... '修改第二个字段
。。。。。。

temppub.update '更新数据
temppub.close
temp.close


accpt25 2005-10-24
  • 打赏
  • 举报
回复
晕死,自己解决了,呵呵!

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧