Zabaware Support Forums

Rob Database request in next version

Started by onthecuttingedge2005, June 18, 2012, 06:01:10 PM

Previous topic - Next topic

onthecuttingedge2005

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.


Dim EmotQuery()
HalBrain.RunQuery "DELETE FROM " & UserName & "_Emotion" & " WHERE id = 1", EmotQuery


which would delete the number 1 row only.

thanks
Jerry

onthecuttingedge2005

#1
I would also like to be able to do this inside Hal's Table creation


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

freddy888

SQL is good but it wouldn't allow you the freedom of VBscript.

Medeksza

#3
Quote from: 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.


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:


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.
Robert Medeksza

onthecuttingedge2005

Thanks Rob that did the trick, works like a charm.

thanks for the additional help and heads up.


much to do.
Jerry 8)