G gonzamax New Member Licensed User Dec 24, 2007 #1 Hello, I have a table which is filled in by a database and I want to delete data in the database, after I have selected a row in the table. I give you the code of my SQL request Con.New1 Cmd.New1("",con.Value) Con.Open("Data Source = " & AppPath & "\relevegeneraux.sl3") cmd.CommandText = "DELETE from gaz WHERE ROWID = idrow1" Cmd.ExecuteNonQuery Con.Close I don't know how to make idrow1 appear as a variable in the request. Thank You
Hello, I have a table which is filled in by a database and I want to delete data in the database, after I have selected a row in the table. I give you the code of my SQL request Con.New1 Cmd.New1("",con.Value) Con.Open("Data Source = " & AppPath & "\relevegeneraux.sl3") cmd.CommandText = "DELETE from gaz WHERE ROWID = idrow1" Cmd.ExecuteNonQuery Con.Close I don't know how to make idrow1 appear as a variable in the request. Thank You
Erel B4X founder Staff member Licensed User Longtime User Dec 24, 2007 #2 CommandText is just a string, so you should use '&' to insert a variable inside: B4X: cmd.CommandText = "DELETE from gaz WHERE ROWID = " & idrow1
CommandText is just a string, so you should use '&' to insert a variable inside: B4X: cmd.CommandText = "DELETE from gaz WHERE ROWID = " & idrow1