News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

SQL Database question

Started by Gunner, April 27, 2012, 10:17:45 PM

Previous topic - Next topic

Gunner

For my current project, I think a database with a few tables is needed.  I am going to install MySQL so I can work with them and use SQLLite in my app to access the db.  Question is, will the user need anything special to use my database or can I just ship the sqllite dll or statically link it to my app and all will be well?
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

fearless

MySQL does provide a .dll lib that supports queries and other sql statements to a server. The actual format of the tables stored i think is not exactly compatible with the SQLLite, although they both do the same thing the SQLLite from what i recall is for local database use and as you said that can be statically linked into your app (and they also have a .dll as well from what i remember)

Ive dabbled in using the MySQL stuff from asm, built some functions to wrap the MySQL calls and even some macros to support SELECT statements and basic parameterized queries.

Couple of problems or gotchas in using it, is the string in most cases probably is too long for the assembler (masm complains about line length too long), so i had to build parts of it together in memory and concat together before sending off the actual api call to the server - hence the macros which help automate it slightly.

The strings in your program probably can be seen from a hex editor, so from a security point of view - if it is an issue - could be something to consider, as access to the tables may need admin access, and the admin name and pass would have to be passed to the server to connect - and these also would prob be stored as strings in your program - although might be possible to get around this. And on remote hosting sites where the MySQL db is stored you may have to open up access to all ip addresses - which again can be a security concern.

Thats the main things i experienced with playing around with it.

The SQLLite way may have some of the same issues, but the database is only likely to be used on the users pc.

So depends on the programs use and what data might be stored and if you need to consider security i think.

Firefox has an addon that allows you to create, edit, browse and add data to sqllite databases, which can be handy for quick development and testing. And of course there are other utils out there that do similar. EMS probably has an Sqllite Manager, they have one for MySQL which ive used - free and pro versions, could be worth googling and checking out to see if it helps.

laters
Ć’earless