B4J Question ExecNonQuery

Discussion in 'B4J Questions' started by codie01, Jul 10, 2015.

  1. codie01

    codie01 Member Licensed User

    Hi all,

    I know how to insert data coded as such:

    sql1.ExecNonQuery2("INSERT INTO sites VALUES(?,?,?,?,?,?,?,?,?)"Array As Object(site_ID.Text, site_Display.Text, site_Subdivision.Text, site_Lot.Text, _
        site_Box.Text, site_Address.Text, site_Suburb.Text, site_City.Text, site_Postcode.Text))
    How do use ExecNonQuery2("UPDATE") to update a record.

    Thanks in advance.
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. codie01

    codie01 Member Licensed User

    Thanks Erel, you work tirelessly, thanks it worked nicely.

    One last one I think and it all works. When the database is updated I want to change the selected row to match. Code to do this but does not work is as follows:

    "UPDATE sites SET site_ID = ?, site_Display = ?, site_Subdivision = ?, site_Lot = ? WHERE site_ID = " & mymatch, Array(site_ID.Text, site_Display.Text, site_Subdivision.Text, site_Lot.Text))
    ' ------ Does not work from here down to change tableview row.
            Dim row As Int
            row = site_Table.SelectedRow
    Dim rowcontent() As Object = site_Table.Items.get(row)
    1) = site_Display.Text
    As Object(rowcontent())
  4. codie01

    codie01 Member Licensed User

    Good Day Erel,

    I have solved this problem and all works. Thanks

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice