Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Error Handling Problem

Status
Not open for further replies.

morechocolate

Technical User
Apr 5, 2001
225
US
I tried using the error collection, but it is not working.

Here is a snippet of code.

Dim objErr As ADODB.Error


For Each objErr In asAccessTables.ActiveConnection.Errors
StatusLog "Description" & vbTab & objErr.Description
StatusLog "HelpContext" & vbTab & objErr.HelpContext
StatusLog "NativeError" & vbTab & objErr.NativeError
StatusLog "Numer" & vbTab & objErr.Number
StatusLog "Source" & vbTab & objErr.source
StatusLog "SQLState" & vbTab & objErr.SQLState
Next

when I typed ActiveConnection. no drop down list appeared. I knew then there was a problem but I am not too sure what it is. It allowed me to type Errors, but nothing is happening.

I forced the error to occur on the AddNew method. I purposely typed the wrong name of a field that is in the Access table.

If it helps I am using Microsoft.Jet.OLEDB.3.51

Thanks in advance.

I did a search and it looks like what I am doing is correct.
 
If you use Access 2000, you must chance Microsoft.Jet.OLEDB.3.51 by Microsoft.Jet.OLEDB.4.0
 
Try getting the errors directly from the connection .. codestorm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top