dsr表(ACCESS)中有两个字段:xm和dsrid,其中dsrid是自动编号类型,用以下语句更新text2中数字与dsrid相同的记录:
dim co as new adodb.connection
dim rs as new adodb.recordsetco.open"......."(略)
co.Execute"update dsr set xm='" & trim(text1.text) & "'" & "where dsrid=clng(trim(text2.text))"
执行时提示至少一个参数没有指定值,不懂是何意思,但是如用一个数字来代替clng(trim(text2.text))却可以正确执行.