OleDb Exception

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Smith

    OleDb Exception

    Hello all:

    I am trying to insert a new row into a database after
    populating all of its fields w/data and then adding the row
    to my dataset's row collection. But when I call the
    adapter's update method on the dataset I get an unhandled
    exception error w/o a description. Any help is appreciated.

    Thanks,

    John
  • Frank Drebin

    #2
    Re: OleDb Exception

    This should be a try/catch block.

    When you catch the exception, you can also "catch" specific errors. So
    instead of:

    catch (Exception e)

    You could catch a more specific error from SQLOLEDB, something like this:

    catch (OleDbException e)

    and that will have much more specific error information than the generic
    Exception..


    "John Smith" <John.Smith@amp am.com> wrote in message
    news:015b01c366 6d$6c791990$a30 1280a@phx.gbl.. .[color=blue]
    > Hello all:
    >
    > I am trying to insert a new row into a database after
    > populating all of its fields w/data and then adding the row
    > to my dataset's row collection. But when I call the
    > adapter's update method on the dataset I get an unhandled
    > exception error w/o a description. Any help is appreciated.
    >
    > Thanks,
    >
    > John[/color]


    Comment

    • John Smith

      #3
      Re: OleDb Exception

      Great, I will give that a try. Thanks for the reply.

      John Smith

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...