Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Data storage - what are my options?

Author
Message
Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 22nd Apr 2010 20:11
The only thing I really liked about working with Python, was I could pretty much find solutions to deal with whatever I wanted to do with files on disk.

I really like SQlite, for example. It is the perfect solution to keep my room data for my Text RPG. I was familiar with it, it was easy to use, etc.. There appeared to be a DarkBASIC wrapper for SQLite at one point, but the URL they had for the site seems to be long since dead.

I'm not really keen on the idea of CSV text files or anything of that stuff.. Although I've considered XML a possibility for storing settings and other data, but again that would require me to spend more money (I don't have) on this or that plugin, depending on what I want/need..

Are there any good open source, freely available solutions out there? This is one of my number one concerns right now, as I am not about to spend days or weeks, polluting my source code with hardcoded data for room descriptions, and other things related to that kind of stuff.. It would be a nightmare if I needed to change something too.

Any suggestions, examples, ideas, etc.. Would be appreciated. Thanks,
-Zach

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Apr 2010 20:44
I'm not quite sure what you're looking for, but is this what you want?

open to write
close file


You can use different write commands to write different things to the file. Here is a list of the commands

write byte
write word
write long
write float
write string
write fileblock
write filedir


And here is a small example:



Hope this helps, I don't know if the above code works, I just wrote it without compiling...

TheComet

KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 22nd Apr 2010 20:48
If you are looking at this for a local app, I would look at IanM's Matrix1Utils. There are some commands in there for file manipulation.

There is also DarkData, although it's not free.

If you are setting up a client/server system, search the forums for MySQL and DBConn.

CattleRustler has a few plugins. One for MySql, one for MSAccess, and one for MSSQL.

DBConn is a plugin that I wrote that lets you connect to any ODBC connected data source.

Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 22nd Apr 2010 21:18 Edited at: 22nd Apr 2010 23:13
Mmmm... Sort of.

I am looking for local storage of data, yes. SQlite, for example (again) can basically be embedded in your application, and will create / open / modify its version of an SQL database file. And there are commands that let you do your storing and retrieving of data though whatever language it can be rigged up with..

The biggest thing I like is that it was really simple and human readable, well, as readable as SQL queries are anyway.

So basically that is the kind of functionality I would like. I'm pretty keen on organizing data via Table like layouts, etc.

I've looked at DarkData, aside from the cost hinderance (I really am dirt poor) it seems rather involved although I'm sure I could learn it and use it effectively.

I appreciate the responses.. I'll have to go back and look at the Matrix1Util's again and investigate the mentioned CattleRustler (although I suspect that might just be for connecting to a running server)

Thanks for the feedback.

edit:
It looks like DBConn might be a suitable option for my needs.. It sounds like I will be able to read from/write to an MS Access database file then? (Doesn't sound like thats an option for the others?). Will I still need MS Access to actually make such a database file, or can I accomplish that with a command in your package too?

I've never used MS Access either. Is it comparable to SQL style databases at all? And assuming I were to use DBconn w/MS Access file- all I need to do for my part is install the plugin, make sure its included in the distribution package that is installed on the user machine, and that's it? No messing with registry or other settings somewhere?

I will download and look at everything when I have some free time.. I'm hoping this is what I need though.. Appreciate any answers for the n00b questions.

-Zach

Neco
18
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Waterloo, Wisconsin USA
Posted: 23rd Apr 2010 20:33
Heh. I actually found the thread for the SQLite wrapper.
It was written by Mnemonix

http://forum.thegamecreators.com/?m=forum_view&t=126525&b=5

Apparently he lost the source code, etc... so I guess that explains why its no longer maintained or anything.. Bummer.

Can we tie him up and make him do a new one?

I guess I really am hung up on this SQlite business It really is a great storage medium... Well I'm sure I'll find a solution at any rate, or cave in and purchase DarkDATA or something.

But in the mean time.. It's source is public domain.. So if anyone with some free time would care to poke around and see if it can't be made in to a plugin without much fuss - that would be really appreciated (at least by me).

Login to post a reply

Server time is: 2026-07-26 07:36:12
Your offset time is: 2026-07-26 07:36:12