Results 1 to 3 of 3

Thread: Saving from dataset to the database

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Posts
    48

    Saving from dataset to the database

    Hey im sort what new to vb and i have this problem saving from dataset to the database.
    When i run the program and input my data in the text boxes, it saves it but i check in the database the record is not there, plus when i re run the program it has disappeared from the dataset.
    I have followed example from msdn and my code is as follows
    Code:
    Try
                Me.Validate()
                Me.CustomerBindingSource.EndEdit()
                Me.TableAdapterManager.UpdateAll(Me.LibraryDatabaseDataSet)
                Me.CustomerTableAdapter.Update(Me.LibraryDatabaseDataSet.Customer)
    
                MsgBox("Update Successful")
            Catch ex As Exception
    
                MsgBox("Update failed")
            End Try
    what im i missing????? help me please. or any advice please......
    novice guy!!!!

  2. #2
    Fanatic Member
    Join Date
    Feb 2007
    Location
    Eindhoven
    Posts
    828

    Re: Saving from dataset to the database

    do you have any insert query in your table adapters?

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Saving from dataset to the database

    In my sig is a link "I swear I saved my data, where'd it run off to?" Might want to check it out and see if it's applicable.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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