|
-
May 15th, 2002, 07:58 AM
#1
Thread Starter
Lively Member
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!!
-
May 15th, 2002, 10:17 AM
#2
Frenzied Member
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.
-
May 16th, 2002, 05:16 AM
#3
Thread Starter
Lively Member
Thanks that code would be great!
-
May 17th, 2002, 01:04 PM
#4
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|