在我的一个函数里:
Dim oRS As ADODB.Recordset
Dim ssql, srCode, srName As String
ssql = "select right_code,right_name from system_authorization " Set oRS = goAdocn.Execute(ssql) '出错了
error:
object variable or with block variable not set 可是我曾经在login in 的ok按扭中用了这句话没错的呀?请各位xdjm帮忙呀.
Dim oRS As ADODB.Recordset
Dim ssql, srCode, srName As String
ssql = "select right_code,right_name from system_authorization " Set oRS = goAdocn.Execute(ssql) '出错了
error:
object variable or with block variable not set 可是我曾经在login in 的ok按扭中用了这句话没错的呀?请各位xdjm帮忙呀.
Dim ssql, srCode, srName As String
ssql = "select right_code,right_name from system_authorization "
Set oRS = new ADODB.Recordset
Set oRS = goAdocn.Execute(ssql) '出错了
Dim ssql as string, srCode as string, srName As Stringssql = "select right_code,right_name from system_authorization "Set oRS = goAdocn.Execute(ssql) 试试,没遇到过。
2 是不是上一次使用oRS之后没有close掉。
Set oRS = goAdocn.Execute(ssql)