Home   Archive   Permalink

rebdb - parameters passing

does someone have a small example of a script that does dynamic select on a rebdb database
I have a rebdb table TEST [ ID NAME ]
I have a form where a user enters the ID to search
view layout [ myId: field    
                button "search" [ srchId ]
then I need to search for that ID in the table TEST

posted by:   yuem     7-Nov-2010/9:24:48-8:00

I didn't use RebDB much, this should help
db-select/where * TEST compose [ID = (myId/text)]
of course it is better to check if myId/text is valid before use:
if parse myId/text validation-rules-block
] [
    db-select/where * TEST compose [ID = (myId/text)]

posted by:   Endo     27-Nov-2010/18:35:12-8:00

Thanks Endo, I actually went with sqlite. It was a lot easier. It was taking too much trial and error with rebdb. sqlite seems to have more docs, which made it easier to use.
at the end of the day, normally the product with the most useful docs normally wins.

posted by:   yuem     5-Dec-2010/15:05:11-8:00

By the way my post looks weird. Some words and brackets are lost.

posted by:   Endo     6-Dec-2010/6:34:47-8:00