Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: ll420ll on December 22, 2012, 06:46:32 pm
-
I want a braintopic table to contain a whole list of attributes, but be able to edit them as conversations progress.
Is there a way to either delete, or update lines of brain tables using a hal commands or coding?
I know theres a way to pull data from brain tables into an temp array, but how could I possibly change or update that data and have hal also update that data in the braintable.
Any help would be greatly appreciated.
Is this type of function used to edit tables? or just temporary arrays?
HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loPatience & " WHERE searchString = " & """" & patParam & """", tempQuery
This how I was storing variables that I want to save but change on the fly. But I want to be able to save and update this data in a braintable.
Rem PLUGIN: CUSTOMMEM
attribute2 = HalBrain.ExtractVar(CustomMem, "attribute2")
'PROCESS: PRESERVE ALL VARIABLES
CustomMem = HalBrain.EncodeVar(attribute2, "attribute2")
-
Just off the top of my head: I believe Hal loads everything (including tables & scripts) from initial start up, therefore, I don't really see how it would be possible to have Hal perform an update on the FLY, so to speak. He (the program) would need to be able to load the tables and process them in accordance to your changes and such on-the-fly procedures don't seem likely.
I'm not speaking for Hal's developer, Robert Medeksza, so perhaps an email to him might offer a faster and possibly more accurate evaluation for your inquiry.
Best of luck!
-
beyond talking to the modem, what are you doing on the table?
ya know the trend here is to put a silly oversized eraser on your desk, and just expect 'computer' todo the rest.
yea, and everything is also in pen.
-
Wow...nice to see that you're still around, One! I thought the aliens had taken you!! ;)
-
Is this type of function used to edit tables? or just temporary arrays?
HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loPatience & " WHERE searchString = " & """" & patParam & """", tempQuery
Yes, this is SQL, and can be used to update existing records, add new ones, delete records, or load them into an array. I recommend maybe reading an intro to SQL book or going through a tutorial of some sort. You can open up Hal's database outside of the brain editor with a free program called "SQLite Studio". If you work on a copy of the brain database, you can experiment with different SQL commands to see what they do.
-
Art,
Aliens? naw just, Hospitals, jails, ect
ever since the accident it's getting progressivly worse.
(Im really tired of the state putting me with robert in different hospitals.)