Updating database with datagrid Web sighthotsex


05-Jan-2015 07:50

The last three lines where the Sql Command Builder begins is where I am attempting to get it to update.

When I have these commands in place I get the catch error on load; however, the data will still load.

The problem is that I cant use generated Fill, Update and Delete commands since in my SELECT query there are two joined tables. I will like to update changes in Cell End Edit procedure. Base Directory & "baza_podatkov.mdb" ' "Provider=Microsoft. Private Sub Form3_Load(sender As Object, e As Event Args) Handles My Base.

Should I fill datagridview with two SELECT statements without joined tables? Joining tables shouldn't make any difference as long as you update to exactly the same combination as you originally filled the DGV with the binding should take care of assigning the new values correctly. Load 'TODO: This line of code loads data into the 'Baza_podatkov Data Set.narocilo' table. Dim CONNECT_STRING As String = _ "Provider=Microsoft.

Reviews: "dunfiddlin likes his Data Tables" - jmcilhinney Please be aware that whilst I will read private messages (one day!

) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

Load 'TODO: This line of code loads data into the 'Baza_podatkov Data Set.narocilo' table. Dim CONNECT_STRING As String = _ "Provider=Microsoft. Base Directory & "baza_podatkov.mdb" Dim cnn As New Ole Db Connection(CONNECT_STRING) cnn. ) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage! Base Directory & "baza_podatkov.mdb" ' "Provider=Microsoft. Reviews: "dunfiddlin likes his Data Tables" - jmcilhinney Please be aware that whilst I will read private messages (one day! Close() End Sub Your problem is in trying to update single values. As I said you need to make the identical selection and then update the whole lot from the dgv bound table..

So back to the old style but with some changes which are entirely peculiar to Access databases (or rather Ole DB). Reviews: "dunfiddlin likes his Data Tables" - jmcilhinney Please be aware that whilst I will read private messages (one day! If my Update query contains where on end of it, then my records are not updating and I'm 99% that my st_artikla is on 1'st position in my joined table.

Open() Dim sql As String = "SELECT item.item_number, item_name, order.quantity,order.notes FROM (order INNER JOIN item ON order.item_id = item. ID_customer = " & Form2.value & ")" Dim cmd As New Ole Db Command(sql, cnn) da = New Ole Db Data Adapter(cmd) da. Dim sql As String = "UPDATE item, order SET item.item_number = @item_number, item.item_name = @item_name, order.quantity = @quantity, order.notes = @notes FROM (order INNER JOIN item ON order. ID)"Dim sql As String = "UPDATE item, order SET item.item_number = @item_number, item.item_name = @item_name, order.quantity = @quantity, order.notes = @notes FROM (order INNER JOIN item ON order. ID)" Firstly my apologies as I misled you somewhat believing that a mass update was possible when it turns out not to be.