database mod

BlitzMax Forums/Brucey's Modules/database mod

allos(Posted 2009) [#1]
I need a simple example/tutorial of how to use database and sqlite mods (eg insert, delete fields) and how to convert queries results in a series of vairables (string, numeric, date, ...)
thank you


Brucey(Posted 2009) [#2]
There are some small examples that come with the DBSQLite module, in the "tests" folder.

If these don't explain/show enough, just let me know what else you'd like, and I'll put together some more examples.


allos(Posted 2009) [#3]
ok Brucey, a closer look to your examples has been useful; I think I can go on and let you know if I find difficult to work it out; a database tutorial would be nice (Assari's one is very good but focused on previous style of database mods)
thank you
Allos


Brucey(Posted 2009) [#4]
a database tutorial would be nice

Yes, it would.

I'll have a think about it, and see if I can come up with something, when I get some time.


allos(Posted 2009) [#5]
ok Brucey
one more question:
in your sqlite example file test01.bmx this row prints strings of the records fields:

DebugLog("Name = " + TDBString(record.value(1)).value + " " + TDBString(record.value(2)).value)

the only way I found to obtain id field printing (numeric autoincrementing index) after browsing docs is:

DebugLog(" id=" + record.getInt(0))

I tried TDBInt (record.value(0)).value) with no success
This is to explain you the kind of stuff I would need help with
Thank you