[求助]急啊,求求高人告诉我
Public Function ExecuteSQL(ByVal sql As String) As ADODB.Recordset
Dim rst As ADODB.Recordset
Dim stokens() As String
'On Error GoTo exectuesql_error
stokens = Split(sql)
Set rst = New ADODB.Recordset
Set ExecuteSQL = New ADODB.Recordset
If InStr("INSERT,DELETE,UPDATE", UCase$(stokens(0))) Then
mycon.Execute sql
Else
rst.Open Trim$(sql), mycon, adOpenKeyset, adLockOptimistic
Set ExecuteSQL = rst
End If
exectuesql_exit:
Set rst = Nothing
Set mycon = Nothing
Exit Function
exectuesql_error:
Resume exectuesql_exit
End Function
为什么老是出现 rst.Open Trim$(sql), mycon, adOpenKeyset, adLockOptimistic错误啊
我用的是ACCESS数据库,MYCON是是数据库链接用的相对路径
或者加我QQ78075493