How to access a database ?

Blitz3D Forums/Blitz3D Programming/How to access a database ?

patmaba(Posted 2003) [#1]
I will like to make query with an Oracle database 8i or 9i.
The Database is on a server.
How can I use SQL or PL/SQL with the database using Blitz3D language?
If not, Does exist a dll to do that ?

Thank you


semar(Posted 2003) [#2]
HI,
as far as I know, there is no possibility (yet) to directly interface Blitz to any database.

I've found something about Access database @blitzcoder, but I can't really remember the entry name.

I think there are two scenarios here:

1) create your own DLL using thirdy part software - ex. purebasic, delphy,...

2) build an application which should take care of the incoming queries from a Blitz program, and return the results back to it.

The way the two modules described above should communicate, is up to you; you can decide to use plan text files, or you can use a more elegant TCP stream connection.

The application that stays between Blitz and the database, could even be hidden and stay listening for queries from the blitz application. I would use, for example, VB6, which comes with a pretty complete and flexible winsock tcp socket; but there are also different possibilities out there.

Of course, you have to set up a minimalistic communication protocol between the two; even a simple tcp chat example could achieve this task.

That said, if you choose this solution, have a look in the code archive. In my signature, also, there's a link to a tcp chat source code.

Hope this helps,
Sergio.


patmaba(Posted 2003) [#3]
I have found a dll used in Jamagic application to access a database.

The URL is :
http://members.shaw.ca/jamhat/Articles/JamODBC.html

How can i use the CallDll function to access JamagicODBC dll and use it in Blitz3D ?


René(Posted 2003) [#4]
When you have a Apache and PHP running you can connect to a mysql database sent with Blitz's TCP/IP commands.
PHP can also connect to ODBC standard Databases like SQL or even MS Access (if you want).