Results 1 to 2 of 2

Thread: Update a record on Windows sql server 2005 Mobile Edition.

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Update a record on Windows sql server 2005 Mobile Edition.

    I use Visual Studio 2005 Pro.
    I try to make a little application to my Smart Device Windows Mobil 5.0 Pocket Pc.
    I have make a little sql database name: SQLTEST
    In this database a have a Table named: NAME
    In this table , I have 2 colums named: NAME, LASTNAME.

    I have inserted some data in to the table NAME.

    I use Form1.vb
    In this form a have following things.

    2 textbox
    5 button
    bindingsource
    sqltestdataset
    sqltesttableadapter
    datagrid

    Bindingsource are connected to sql database named: SQLTEST. And the table named: NAME.
    Datagrid are connected to bindingsource.
    2 textbox are connected to bindingsource.

    When I start the application,
    form1 show, and the datagrid is show some datarecord that I have insert manual in the Table.
    That’s only 3 record’s.

    And the data is showing in the 2 textbox.

    I have 5 button’s on the form1.
    1 button named ADD. In this button I have a code like this: Me.Bindingsource.AddNew()
    2 button named NEXT. Code like this: Me.Bindingsource.MoveNext()
    3 button named FIRST. Code like this: Me.Bindingsource.MoveFirst()
    4 button named DELETE. Code like this: Me.Bindingsource.RemoveAll()
    5 Button named UPDATE. Code like this:
    Me.Bindingsource.EndEdit()
    Me.Sqltesttableadapter.update(me.Sqltestdataset.name)


    When I push the button named: NEXT, The textbox are showing the next record.
    My problem is: When I push the ADD button. And type something in the 2 textbox, this record are show’n in the datagrid, and the textbox, when I clikk on the button’s FIRST, and NEXT.

    I can put in some more record in the database, but when I close the application, and start it up again, the record are missing.
    Only the 3 record, that I made before.
    Is there some body ho can help me?

  2. #2
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Update a record on Windows sql server 2005 Mobile Edition.

    are you sure you saved the data back to the file?
    make sure you do a commit

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

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