Results 1 to 4 of 4

Thread: sql queries

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    67

    sql queries

    Hi All,

    does anyone know what code i would need to:

    1: create a new row within an access database, or a dataset.
    2: populate that row with data from a text box.
    3: Do sql queries on database directly .


    thanks!!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You dont need to use SQL to create a new row or add it to the DB. After connection and everything is set up in the database. Create a dataTable from the table in your dataset where
    you want to add the new row. Then create a new datarow on the datatable. After that you need to add information to the new datarow, then update the dataset.

    It is really simple, I'm not at a VS.NET workstation, but I will provide some sample code when I get home later.

    Look up dataRow and dataTable.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    67
    Thanks that code would be great!

  4. #4
    Junior Member
    Join Date
    Apr 2002
    Location
    Egypt
    Posts
    31
    Code:
     Me.BindingContext(Dataset_Name, "Table_Name").EndCurrentEdit()
                Me.BindingContext(Dataset_Name, "Table_Name").AddNew()

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