database connection error

  • Thread starter Charlie Brookhart
  • Start date
C

Charlie Brookhart

I created a program that retrieves data from an Access database and displays
the data in textboxes. The program worked during multiple debug testing and
when I switched the configuration to release build, the solution ran with no
problems. Now that I closed out of everything and try to open the solution,
I receive an error message:

An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred
in system.data.dll

My question is, how is it possible for it to work one time, and then on all
subsequent tries, display an error message? No files have been moved/deleted
or renamed.
 
C

Cor Ligthert [MVP]

Charly,

With system.data you have forever to set your methods inside try and catch
blocks.

Something as this
Try
da.fill(myDataset)
Catch ex as Exception
messagebox.show
End Try

This is an absolute minimum.
(It gives you than more details about the error)

I hope this helps,

Cor
 

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