Game Development Community

ADO database access from script done!

by Josh Goldshlag · in Torque Game Engine · 05/17/2002 (8:24 pm) · 9 replies

I just about wrapped up a few files that let people access databases through ADO. Right now, it is windows only, mostly because I can't figure out if there is a mac/linux version of ADO. I think I could port it to support MySQL for all platforms, but that will have to go into version 2. I will be cleaning up the code and providing some examples this weekend and will try to post the code Saturday or Sunday.

I currently support executing any SQL statement and doing batch modifies through the ADORecordset. If anyone has some specific needs, please let me know. I have only tested with SQL 2000 Developer, so if anyone out there has a system with another database and whats to test, post and I can send you the code.

Josh

#1
05/17/2002 (8:51 pm)
I tried out Future Interactive's MySQL support (http://www.futureint.de) but I realized that direct access to the databases are not very secure. (The MySQL worked great otherwise :)

If you are using the database to handle client-side info then there's no big deal (in an ADO case).

But if you want the database to handle senstive data (like Users login/passwords) if opens up too many potential security problems. At least if you are going to make it accessible thru script.

It's better, I think, to setup a server as a proxy between the user and the database directly. You could use the HTTPObject in combination with a php/asp/perl/java backend if speed isn't an issue.
#2
05/17/2002 (8:55 pm)
ADO is only available via windows since it relies on COM/DCOM.

The only way to support multiple plaform database access that I know of is ODBC and that is only if there is a driver implementation for that database for that platform.
#3
05/18/2002 (7:26 pm)
Anthony,

I don't think the HTTP object supports https, so it doesn't seem like you get any security advantages from using it. My intent with the ADO classes is mostly for server side stuff, so people can do things like keep high scores, logins, and possibly for one of the many MMORPGs that are currently being thought about/developed.

Jarrod,

I will have to take a look at ODBC. ADO is supposedly built on top of it, so it seems like I should be able to duplicate the ADO functionality.

Josh
#4
05/18/2002 (7:45 pm)
There is a resource that does ODBC, but leverages the MS libraries to do so.


Post this as a resource, someone will use it :)
#5
05/18/2002 (8:02 pm)
That's great and all... if you aren't releasing the server source.

Otherwise you would be opening yourself up to a serious attack. :(
#6
08/08/2005 (1:03 am)
Hi Josh,

i am doing a mutiplayer game and wanted to link our game to the SQL database Server so that i am able to store the user id, user password and user score. however due to the lack in knowledge in this area, i have no idea how to connect the game to the database. i would like to know, whether ur codes would allow me to create the "link" so that i can retrieve and update the score of the players in th game. or can u tell me how i can go about doing the "link".


kawai,
(a student)
#7
08/08/2005 (1:26 am)
@Temasek,

Use the resources you have available to you, instead of bumping 3 year old posts. First, I would search the site for SQL.. if you do that, you'll get to a resource that will show you how to connect to a SQL database in 2 ways. Josh is not even active on the forums anymore :)
#8
08/09/2005 (10:53 pm)
Hi stefan.
it is me (chunwei, student of tp)again.
i search the site, one of the way u mention was using ODBC rite?
wat is the other?

chunwei(student)
#9
08/09/2005 (10:55 pm)
Oh btw temasek polytechnic is the school name so pls to aim at it. we (student) left our name at the end of the post. :P

chunwei(student)