'创建虚拟记录集
Set vRs = New ADODB.Recordset
With vRs
.Open "select * from 任务人员组成 where 1=2", Conn, adOpenStatic, adLockBatchOptimistic
.AddNew
.Fields(1) = TextNo
.Fields(2) = Left(roleCbo.Text, InStr(roleCbo.Text, "-") - 1)
.Fields(3) = Left(userCbo.Text, InStr(userCbo.Text, "-") - 1)
.Fields(4) = "admin"
.Update
.Close
End With
Set vRs = New ADODB.Recordset
With vRs
.Open "select * from 任务人员组成 where 1=2", Conn, adOpenStatic, adLockBatchOptimistic
.AddNew
.Fields(1) = TextNo
.Fields(2) = Left(roleCbo.Text, InStr(roleCbo.Text, "-") - 1)
.Fields(3) = Left(userCbo.Text, InStr(userCbo.Text, "-") - 1)
.Fields(4) = "admin"
.Update
.Close
End With
解决方案 »
- 关于VB6.0
- 辛辛苦苦做了一些年的程序,到年底连车费都买不起我应该怎么做?
- 用CommondDialog控件怎么样一起导入多个EXecl文件?高手请指点!
- CPU使用率的问题,如何得到CPU当前的使用率?
- 请各位版主.大哥帮帮我时间比较紧在线等................
- 想用WINSOCK控件
- 小弟想在form2中使用form1中定义的cnn1连接与rst1记录集,该怎样用,这样可以吗?
- 关于MSchart控件的两个小问题88分
- 在LIST控件中 读取记录 但是错误说 对象变量 OR with块变量未定义!!!高分啊
- 程序打包问题(DAO)
- 送分题:取整函数忘了怎么写?
- 大家快来帮忙看看,急急急!!!!!!!
Set vRs = New ADODB.Recordset
With vRs
.Open "任务人员组成", Conn, adOpenKeyset, adLockBatchOptimistic,adcmdtable
.AddNew
.Fields(1) = TextNo
.Fields(2) = Left(roleCbo.Text, InStr(roleCbo.Text, "-") - 1)
.Fields(3) = Left(userCbo.Text, InStr(userCbo.Text, "-") - 1)
.Fields(4) = "admin"
.Update
.Close
End With
修改数据的话去掉AddNew