- Jun 6, 2020
- 11,559
- 4,422
Hi all,
I need to update records in a database with ExecNonQuery2. But the values in the array need to be enclosed in quotes.
My query:
B4X:
The query should look like:
B4X:
I can't figure out how to combine the sql query with the smart string literals.
B4X:
When I log the query in all cases I see
B4X:
so the variables are not communicated (something to do with ExecNonQuery2 and quotes?).
I can work around it by building the query as a string first and then using ExecNonQuery instead of...
I need to update records in a database with ExecNonQuery2. But the values in the array need to be enclosed in quotes.
My query:
B4X:
sql.ExecNonQuery2("UPDATE parts SET PartID = ? WHERE PartID = ?",Array("'" & row(1) & "'", "'" & row(0) & "'")) '<-- this doesn't work
The query should look like:
B4X:
UPDATE parts SET PartID = 'newvalue' WHERE PartID = 'oldvalue'
I can't figure out how to combine the sql query with the smart string literals.
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
When I log the query in all cases I see
B4X:
UPDATE parts SET PartID = ? WHERE PartID = ?
so the variables are not communicated (something to do with ExecNonQuery2 and quotes?).
I can work around it by building the query as a string first and then using ExecNonQuery instead of...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید