Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: onthecuttingedge2005 on June 18, 2012, 06:01:10 pm

Title: Rob Database request in next version
Post by: onthecuttingedge2005 on June 18, 2012, 06:01:10 pm
Hi Rob.

I have tried to use the delete by ID# in the table rows within the database inside HAL's brain editor but
the rows in the data do not have ID#'s, they are just blank and show no ID.

in the next version update can we include the ID# for the Table rows that way I can use this code.

Code: [Select]
Dim EmotQuery()
HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotion" & " WHERE id = 1", EmotQuery

which would delete the number 1 row only.

thanks
Jerry
Title: Re: Rob Database request in next version
Post by: onthecuttingedge2005 on June 18, 2012, 06:57:43 pm
I would also like to be able to do this inside Hal's Table creation

Code: [Select]
Dim EmotQuery()
    HalBrain.RunQuery "INSERT INTO LogTest(OldName, NewName, Date) VALUES(old.Name, new.Name, datetime('now'))", EmotQuery

and also use the CREATE Table as well as all the SQLite functions.

I'm actually starting to like SQL better than I do VBscript
It's very powerful

at some point in the future could we get an SQL version of HAL's Brain with no VBscript?

Thanks
Jerry
Title: Re: Rob Database request in next version
Post by: freddy888 on June 19, 2012, 08:08:31 am
SQL is good but it wouldn't allow you the freedom of VBscript.
Title: Re: Rob Database request in next version
Post by: Medeksza on June 19, 2012, 09:05:13 pm
Hi Rob.

I have tried to use the delete by ID# in the table rows within the database inside HAL's brain editor but
the rows in the data do not have ID#'s, they are just blank and show no ID.

in the next version update can we include the ID# for the Table rows that way I can use this code.

Code: [Select]
Dim EmotQuery()
HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotion" & " WHERE id = 1", EmotQuery

which would delete the number 1 row only.

thanks
Jerry

The hal database uses "recordId" as its primary key, not "id", so I think this should work:

Code: [Select]
Dim EmotQuery()
HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotion" & " WHERE recordId = 1", EmotQuery

Hal uses the SQLite2 engine. It should support all the SQL commands and functions built into that engine.  On the zabaware.com server side Hal is using multiple MySQL servers in a master-slave setup plus the Sphinx full-text indexing from http://sphinxsearch.com/  It is vastly superior to full text search capabilities of MySQL.
Title: Re: Rob Database request in next version
Post by: onthecuttingedge2005 on June 20, 2012, 10:32:21 am
Thanks Rob that did the trick, works like a charm.

thanks for the additional help and heads up.


much to do.
Jerry 8)