Alexandru_mbm

I have datagridview populated by me with some data. This datagridview represents an invoice and is unbounded.

Now... my question is.. How can i save all this data to a MDB Table named Invoices

Anyone can help me to solve this problem

Thanks an sorry for my bad english and for my newb question!




Re: Visual Basic Express Edition Save DataGridView to Table

Alexandru_mbm

No one can help me with this problem




Re: Visual Basic Express Edition Save DataGridView to Table

_Nightblade_

Alexandru

If i read it right you have 2 Different tables

and you want to save one to the other without

binding them.






Re: Visual Basic Express Edition Save DataGridView to Table

Riquel Dong ĘC MSFT

Hi Alexandru,

Based on your post, you need to save the data to the database. I recommend you directly create the DataTable object and fill the data from the database and edit the data in this datatable object. It is the easiest method to edit the data in the database. If you insist your method, you need to execute the Oledbcommand for you like the following code snippet.

Code Snippet

Dim cmd1 As OleDbCommand = New OleDbCommand("UPDATE Shippers SET CompanyName ='value1' " & " WHERE ShipperID = 2")

Dim cmd2 As OleDbCommand = New OleDbCommand("INSERT INTO Shippers (CompanyName,phone) " & "VALUES ('billy', '1334455')")

Cmd1.Connection = con

con.Open()

cmd1.ExecuteNonQuery()

con.Close()

Thanks.