how to solve Runtime error 3704 in visual basic 6.0?
Private Sub Form_Load() Ado.ConnectionString = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & (App.Path & "\Test.mdb") & ";Pe开发者_如何转开发rsist Security Info=False;") Ado.RecordSource = "select * from Emp" Ado.Refresh Call RSRun("select EmpName from Emp") lst.Clear lst.AddItem ("All") While RS.EOF = False lst.AddItem (RS.Fields(0).Value) RS.MoveNext Wend End Sub
Im modules
Public Sub RSRun(ByVal SqlStr As String) On Error GoTo Er Set RS = Nothing RS.Open SqlStr, Conn, adOpenDynamic, adLockOptimistic Exit Sub Er: MsgBox Err.Description, vbCritical, "error-" & Err.Number End Sub
Thanks,
YugalWhere is Conn
defined and could it be closed at the point when RS.Open...
is called?
精彩评论