Results 1 to 4 of 4

Thread: no error handling on dataset inesert?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2008
    Posts
    25

    no error handling on dataset inesert?

    hi
    im using vb.net 2005
    I have a simple insert using a typed dataset
    exactly the same process in another project works fine

    Dim newRow As myDataSet.tblFieldRow = myDataSet.tblField.NewRow
    newRow.firstname = "jon"
    newRow.surname = "smith"
    myDataSet.tblField.AddtblFieldRow(newRow)

    No data is being inserted into tblfield , but there is no error message
    again this works fine , inserting the data in another project
    It gives no error message when running the code , so I just dont know where to start debugging this
    any ideas ?
    thanks

  2. #2
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Ancient City, U.S.
    Posts
    1,254

    Re: no error handling on dataset inesert?


    Are you sure it's exactly the same? There may be some subtle difference that you're not seeing.

    Are both pieces of code referencing the same table and using the same typed dataset?

    Are you updating the same fields in both sets of code?

    There's a monkey wrench somewhere.
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  3. #3
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: no error handling on dataset inesert?

    try with
    Code:
    Dim newRow As datarow = myDataSet.tblField.NewRow
    __________________
    Rate the posts that helped you

  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: no error handling on dataset inesert?

    Do you mean it doesn't insert the row into the tblfield in your database
    or it doesn't insert hte row into the table in your dataset?
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width