Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: GrantNZ on December 11, 2005, 01:35:11 am

Title: Deleting/changing database info in script
Post 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?Thanks!

Title: Deleting/changing database info in script
Post by: GrantNZ on December 11, 2005, 02:38:36 am
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:
Code: [Select]
HalBrain.RunQuery "UPDATE KAOSSettings SET topic = '0.2' WHERE searchString = 'Version'", KAOSTempAs 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
Title: Deleting/changing database info in script
Post by: Jake on April 21, 2008, 05:42:59 pm
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