How do I track down this error??? A first chance exception of type 'System.Runtime.InteropServices.

H

Hexman

Hello All,

Back once again with a problem that prohibits me from adding records to an Access database. What I'm doing is reading and parsing a comma delimited
file and adding each record to the database. I get this error "A first chance exception of type 'System.Runtime.InteropServices.COMException'
occurred in xxx.exe.". (xxx.exe is my program) I tried looking into the exception handling routines and found that HRESULT may have an answer for
me, but I don't know how to access HRESULT. Then once accessed I need to know how to relate that to a table of problems (exception classes) so I can
determine course of corrective action.

There are 63,458 input records yet only 52,215 have been added to the db. I checked on some of the missing records and they look OK as to content
and are not duplicates.

Can someone help me on this one?

Thanks,

Hexman

P.S. Using VB.net 2005, Access 2003 DB.

Private Sub BI_Process()
While LoadNextLine()
Try
BIrstData.AddNew()
BIrstData.Fields.Item("BIDate").Value = GetField(2)
' several other fields loaded
cntAdded = cntAdded + 1
BIrstData.Update()
Catch ex As Exception
'An exception occurred
'Debug.Print("BIData Error:" & GetField(2) & "===" & ex.ToString)
End Try
End While
CSVFini()
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top