database connection error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Charlie Brookhart

    #1

    database connection error

    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.Ol eDb.OleDbExcept ion' 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.


  • Cor Ligthert [MVP]

    #2
    Re: database connection error

    Charly,

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

    Something as this
    Try
    da.fill(myDatas et)
    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

    "Charlie Brookhart" <charliebrookha rt46@hotmail.co m> schreef in bericht
    news:i42dnSmu_d J7GsDZnZ2dnUVZ_ tydnZ2d@adelphi a.com...[color=blue]
    >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.Ol eDb.OleDbExcept ion' 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.
    >
    >[/color]


    Comment

    Working...