Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: GrantNZ on December 11, 2005, 01:35:11 am
-
Hi all,
Does anyone know of a way in script to do any of the following?- Change a database entry
- Delete a table
- Delete a database entry
Thanks!
-
Never mind! I found my own answer once I remembered the database is SQL.
For anyone else who needs it, here's how to change a topic search table entry (I've bolded terms that you need to replace):
HalBrain.RunQuery "UPDATE tablename SET topic = 'newvalue' WHERE searchString = 'lookupvalue'", temp
My issue was updating a "Version" entry in my KAOSSettings table, from 0.1 to 0.2 in script. So my specific command is:HalBrain.RunQuery "UPDATE KAOSSettings SET topic = '0.2' WHERE searchString = 'Version'", KAOSTemp
As for the rest of my questions, or how to adjust entries in other types of table, I have no idea [:)] But I'm happy for now.
Cheers,
Grant
-
On the above topic, what is the purpose of the "temp" variable at the end of the statement...
HalBrain.RunQuery "UPDATE tablename SET topic = 'newvalue' WHERE searchString = 'lookupvalue'", temp