ADODB + Select
16.09.2005 08:59:28
Gerald
der DC_KEY ist in der datenbank nicht vorhanden!
wieso kommt dann bei recordset.Close:
Run-tim error '3219'
Operation is not allowed in this context
was soll ich in diesem fall machen, und wie prüfe ich ob der fehler von select kommt? anscheinend ist recordset gar nicht opened?
cu
For rowcount = 1 To rows - 1
command.CommandText = "Select * From Fehlerk.Defectcatalog Where DC_KEY=" + Cells(rowstart + rowcount, colstart + keycolumn - 1).Text
recordset.CursorLocation = adUseClient
recordset.Open command, , adOpenStatic, adLockOptimistic
On Error GoTo ErrorHandler
recordset.MoveFirst
.....
.....
.....
ErrorHandler:
For Each errorObject In recordset.ActiveConnection.Errors
MsgBox "Description: " + errorObject.Description
MsgBox "Number: " + Hex(errorObject.Number)
Next
recordset.Close
Next rowcount