R
ronaldlee
Hi, I got an error message - Operation is not allowed in this context.
It said the error comes from the line objRS.Close()
Anyone have any ideas why? Thanks a lot.
Here is part of the code:
Dim strConnectionString As String =
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=c:\test.mdb"
objConn = New ADODB.Connection
objConn.Open(strConnectionString)
objRS = New ADODB.Recordset
objRS.ActiveConnection = oCn
objRS.LockType = ADODB.LockTypeEnum.adLockOptimistic
objRS.CursorType = ADODB.CursorTypeEnum.adOpenDynamic
objRS.Open("SELECT * FROM Customers WHERE CustomerID = " &
Session("CustomerID"), objConn)
' DO SOMETHING HERE'
objRS.Close()
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
It said the error comes from the line objRS.Close()
Anyone have any ideas why? Thanks a lot.
Here is part of the code:
Dim strConnectionString As String =
"PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source=c:\test.mdb"
objConn = New ADODB.Connection
objConn.Open(strConnectionString)
objRS = New ADODB.Recordset
objRS.ActiveConnection = oCn
objRS.LockType = ADODB.LockTypeEnum.adLockOptimistic
objRS.CursorType = ADODB.CursorTypeEnum.adOpenDynamic
objRS.Open("SELECT * FROM Customers WHERE CustomerID = " &
Session("CustomerID"), objConn)
' DO SOMETHING HERE'
objRS.Close()
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*