|
关于recordset的
Dim cngraduate As New ADODB.Connection
Set cngraduate = CurrentProject.Connection
Dim rsteacher As New ADODB.Recordset
'建立与数据库的链接
Set cngraduate = CurrentProject.Connection
rsteacher.LockType = adLockOptimistic
'让cngraduate成为与当前数据库链接的当前链接
rsteacher.Open "select * from 结算单查询 where ([结算单编号] like '" & Me.Text6.Value & "')", cngraduate
我写了这么一段,“结算单查询”是当前数据库里面的一个查询,然后在执行到
rsteacher.Open "select * from 结算单查询 where ([结算单编号] like '" & Me.Text6.Value & "')", cngraduate
这段的时候报错,
说是
运行时错误‘-2147217904(80040e10)’:
至少一个参数没有被指定值请教是那里的问题,应该如何设置? |
|