Home All Groups Group Topic Archive Search About

database connection error

Author
7 May 2006 5:39 AM
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.

Author
7 May 2006 7:58 AM
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

Show quoteHide quote
"Charlie Brookhart" <charliebrookhar***@hotmail.com> schreef in bericht
news:i42dnSmu_dJ7GsDZnZ2dnUVZ_tydnZ2d@adelphia.com...
>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.
>
>