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.
Re: How to insert data from dataset to ms access table using vb.net
Show your code for the query, for starters....
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.
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.
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.
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