I am using this helper function to open my local helper table in ADODB.RecordSet with VB.NET.
where sql eguals:Code:Public Sub OpenRecordSetDynamic(ByRef recordSet As ADODB.Recordset, ByVal sql As String, ByRef dbConn As ADODB.Connection) Try recordSet.Open(sql, dbConn, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic, ADODB.CommandTypeEnum.adCmdText) Catch ex As Exception Dim funcName As String = System.Reflection.MethodInfo.GetCurrentMethod().Name Console.WriteLine(funcName & ": " & ex.Message & ", Source: " & ex.Source & ", StackTrace: " & ex.StackTrace) End Try End Sub
I get an exception that the object is closed, i.e in this case, it doesn't open the table.Code:DELETE FROM MyTable;
Note: by local table i mean a table created in Access 2000.
What should I do in VB.NET?
And what do i do wrong?




Reply With Quote
