Zabaware Support Forums

Deleting/changing database info in script

Started by GrantNZ, December 11, 2005, 01:35:11 AM

Previous topic - Next topic

GrantNZ

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!

 

GrantNZ

#1
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'", 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
 

Jake

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
Austin, Texas, USA, Earth