Hi Folks,
i made a Library for easy Database Access in GLB. Based on SQLite3.
Please PN me for a Registration-Number. Its for free - i want only see how many people use this Lib.
The Demo Version ( DBInit(0) ) can open only 5 Databases.
trucidare
New Commands since Initial-Release:
DBRawCommand(Database,"SQL-String")
DBSearch(Database,"Table","Field for Search","What you want to have - Return","Searchstring")
DBGetTimestamp()
DBMakeRealDate$(Timestamp)
DBMakeRealTime$(Timestamp)
[attachment deleted by admin]
Very helpful, thanks a lot.
:nw: I owe you one !!! YAHOO !!!!
Sent you a msg some days ago... can you send me the reg number ? Thank you.
btw one question...max. of 15 tables, for the registered version ? is that right ?
no 15 Databases similar open. YOu can put (integert) value of Tables in one Database.
I send you the code yesterday. Now have fun :)
Is there a way of getting a (any) database cross-platform?
is in the work
.so / .dylib and the sdlbasic sqlite3 portation for gp2x. Any other platforms - i dont know how
Is simple to make the lib. Only compile with cross bin tools and everything works great. Problem now is
the tDB is compiled with GLB.
Hm... Why not just linking to libsqlite.o for any platform?
Give me a little how to, i never linked o files before
Please don't forget to let us know about any new update on this..
I would like to leave a feedback, because this works so great... it improve my loading time in 500% as my previous version used .ini files for loading data into the program... Thank you Trucidare.
i work on a network solution and some improvements like raw commands.
please give a feedback on existing functions. what to make better...
well, we can talk further about it... my expertise is databases anyway (IBM DB2)... thas why my programming skills sucks !! :D
only thing I have missed so far was to send sql commands, but that is what I think you meant by raw commands.
would you be able to write something using odbc ? because with it we could access any database even Oracle or DB2 (they have free version as well)
network solution ?what do you mean ?
i havent read about a cross plaform odbc driver. so i make it with dll´s mysql lib will come after tDB works fine.
Network solution is a simple server that stores data from client in tDB and send it to clients. for games using webservers for datastorage.
you can use ODBC (Open database connectivity) to access any database if you had installed its odbc drivers on the machine.
loved the news about the network solution.
Done Raw-Command solution. Update soon. Please send me more commands, needed for your projects.
Sorry for DoublePost:
Update Now!
New Commands:
DBRawCommand(Database,"SQL-String")
DBSearch(Database,"Table","Field for Search","What you want to have - Return","Searchstring")
Have a nice day
// Oops forgotten to Load up the update :/
See First Post
EDIT://
Small Update:
New Commands:
DBGetTimestamp()
DBMakeRealDate$(Timestamp)
DBMakeRealTime$(Timestamp)
its a small Update for Using Timestamps in tDB.
Update in First Post...
very nice.. I'll download it and test this new functionalities... Let you know later what I think...
thank you Trucidare...
not all of us works with SQL commands before. i want to make it simply for all.
just playing with the new profiler option :)
Function | Calls | Tot.with childs | Exec.only | Av.Exe[s/call] |
DBInit | 1 | - | - | - |
DBCreateNew | 1 | 0.00200 | 0.00200 | 0.00200 |
DBAddTable | 5 | 0.03300 | 0.03300 | 0.00700 |
DBAddField | 36 | 0.08600 | 0.08600 | 0.00200 |
DBReadRecord | 100 | - | - | - |
DBPut | 200 | 1.67400 | 1.67400 | 0.00800 |
DBGet_Str | 1288 | 0.00400 | 0.00400 | - |
Hello trucidare.
how this DBReadrecord works ? Can you do a little more detailed explanation ?
I really don't get why to do it...
and what about the rawcommand one... can I use it for select ? do I need to use the readrecord as well ? I'm sorry,kinda confused with this...
Yes, it would be cool to have a "cleaned up" version of this. With a small tutorial.
And please, please inline "C" code, so we don't need the .dll (and can compile on PocketPC :P )
Hello trucidare, is there any update coming soon ? :D
Yes nearly in future but work on gui before. please write if a critical error or must have then i make a fast update.
Note to everyone, that comes to this Thread:
Trucidare has released the sourcecode of the last version of tDB here: http://www.glbasic.com/forum/index.php?topic=7563.msg62556#msg62556
Thank you Trucidare! :good:
----------
I have no C experience and cant get it to work, can someone plz help me? :nw:
I tried it with an without the GLB-Headerpack, in both cases I get the following error:
In file included from C:\Users\kanonet\AppData\Local\Temp\glbasic\gpc_temp0.cpp:286:
C:/Users/kanonet/Desktop/tDB/tDB/depends/sqlite3.h:37:67: stdarg.h: No such file or directory
you need the header package from kitty somewhere in the download or news section of the main site
Yeah like i said i tried it with the headerpackage too, same result.
I got it working under Windows:
copying the headers wasnt the only thing necessary, i also needed to copy "libsqlite3dll.a" into "GLBasic\Compiler\platform\Win32\Lib". So no problems under Win anymore.
But it only links dynamical, so i still need the .dll to run it. Is there a way to static link it? If i use "libsqlite3.a" instead of "libsqlite3dll.a" it is static linked, but how can i force this behaviour?
But i cant get it to work with Linux (i guess "sglite3dll.a" is only for Win?), i get this error:
compile+link:
In file included from /cygdrive/C/Users/kanonet/AppData/Local/Temp/glbasic/gpc_temp0.cpp:296:
/cygdrive/C/Users/kanonet/Desktop/tDB/tDB/depends/sqlite3.h:37:67: stdarg.h: No such file or directory
Can someone help me with this, please?
And finally: the sqlite version used is very outdated, would there be a way to use a newer one? On sqlite.org i cant get a .a file just .c, (how) would it be possible to use this?
Thank you in advance for your help, please keep in mind, that i have no C experience, so please make it clear for me noob.
Just came across this post as I was looking for a database integration. I assume you either sorted it or no longer need the problem fixed as it's been a few months.
The error though is whinging about a missing header file (stdarg.h) - you'd need that in the right place on your server in order to compile the code.
I havent worked with database since my last post here. But headers werent the problem, it worked under Windows, but not under Linux, like i said before.
best would be to not include stdxxx.h, but make your own tiny header and only include the typed you need. (for small libraries).
The GLBasic headers file are rather out of date. In addition, there are no headers for various platforms either, meaning the routine can't be used on, say, WIZ.
I usually try and remove all #include files and replace various functions with alternatives - for example, fopen gets replaced with open, as the latter is already defined by GLBasic and just needs an extern "C" to be accessible by all platforms...
oops some days away and someone dig out the tDB Thread :/
there are some issues? Should i make a new, better version?
Yeah, go on - it'll be a right larf :)
It would be great to have good database integration as part of the language if you have the time to improve it!
ok i will use some brain to make a new - better one - hmm a object based one?
*use pen & paper*
I would like to get a new one too, multiplattform plz (i need it on linux).
OO? - i would like it with as less overhead as possible, i was even thinking about using a mysql server. But i have no DB/SQL knowledge, so if you make it easy to use, i have no problem with some overhead.
Please no OO!!!!!!!!!!!!!!!!!!!
the old one was crossplatform too - i released the source and it could be compiled for all platformes that can use sqlite3.
i wanted to try to store types in database - so you can use db.store(myType)
a database type with fake methods which kitty made possible somne Versions before.