[v56] DatabaseQuery() accepts Update SQL and db is modified.

Just starting out? Need help? Post your questions and find answers here.
User avatar
skywalk
Addict
Addict
Posts: 3972
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

[v56] DatabaseQuery() accepts Update SQL and db is modified.

Post by skywalk »

DatabaseQuery() wrote:Only queries which doesn't change the database records are accepted ('SELECT' like queries). To performs database modification, use DatabaseUpdate().
This SQL worked using DatabaseQuery(), using SQLite db on Windows 10 Pro x64.

Code: Select all

q$ = "UPDATE `MyTable` SET `X`=" + Str(#PI)
q$ + " WHERE `r(id)`=" + Str(my_id) + #SEMI$
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum