-
December 20th, 2012, 02:24 PM
#1
How to insert data from dataset to ms access table using vb.net
i have the result of the query in a dataset. now i need to insert the data in dataset to an existing table in ms access.
How to do this., kindly give me the solution with code.,
Thanks in Advance.
-
December 20th, 2012, 05:45 PM
#2
Re: How to insert data from dataset to ms access table using vb.net
Show your code for the query, for starters....
-
December 21st, 2012, 12:18 AM
#3
Re: How to insert data from dataset to ms access table using vb.net
the following code obtains the cartesian product from "cname_4_car_pro" and "stock" table and fills the result in dataset "ds".the dataset contains around 230 rows.
Dim da As OleDbDataAdapter = New OleDbDataAdapter("SELECT cname_4_car_pro.cname AS cname, stock.sno AS sno FROM cname_4_car_pro, stock", con)
Dim ds As DataSet = New DataSet
da.Fill(ds, "car_pro_temp")
i dont know how to insert the data in dataset to the table named car_pro_temp in the ms access database.
i need the code to insert the data from "ds" to "car_pro_temp" using vb.net.
-
December 21st, 2012, 01:00 AM
#4
Re: How to insert data from dataset to ms access table using vb.net
INSERT INTO might do it, if the data is perfectly formatted, without errors. I'd save a table then insert it when it's right.
-
December 21st, 2012, 01:43 AM
#5
Re: How to insert data from dataset to ms access table using vb.net
Can u plz give me the sample "code" for inserting all the data from dataset to DBtable.
-
December 21st, 2012, 01:37 PM
#6
Re: How to insert data from dataset to ms access table using vb.net
Code:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)
http://www.w3schools.com/sql/sql_insert.asp
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
|