Results 1 to 6 of 6

Thread: C# and Database: How to Insert New record and save it

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Angry C# and Database: How to Insert New record and save it

    Dear All,

    I am a very much new to C#. Today I developed my first database application using c#.

    I am doing this to bind records:

    txtLastName.DataBindings.Add("text", myds, "pm.last_name");

    To move to next record(clicking next button):


    CurrencyManager cm = (CurrencyManager)this.BindingContext[myds, "pm"];
    if (cm.Position < cm.Count - 1)
    {
    cm.Position++;
    }

    else

    MessageBox.Show("End of records", "my application", MessageBoxButtons.OK, MessageBoxIcon.Information);


    and so on.

    I have completed the record navigation functionality(FirstRecord, LastRecord, Next, Previous).

    Problem:

    I don't know how can I insert a new record and save it.
    Please guide me in the above mentioned application.

    Also recommend a good tuturial+example on web.

    Thanks
    Last edited by engineer; Jun 2nd, 2006 at 05:20 PM.
    software 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