You are not logged in.
Pages: 1
Is there a way to call a simple query? I have a table with some fields (for eaxmple "Order", "Name", "Type", ...), I need change all value of "Type" field to "1" when "Order" value is equal "0".
So I need only change some value on database and as result to know if the operation is successful.
I have check on source and I have find only 2 type of Update function but I cannot use a string as query with them.
Is there a way?
Offline
I think I have found the solution. I need use "EngineExecute" function, right?
Offline
For such queries, it's indeed much more simple to write a SQL statement.
Then use EngineExecute:
Client.EngineExecute('UPDATE tablename SET Type=1 WHERE Order=0');
or with a prepared statement (if your numerical values may vary):
Client.EngineExecuteFmt(
'UPDATE % SET Type=:(%): WHERE Order=:(%):;',[Table.SQLTableName,1,0]);
Offline
Pages: 1