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 / How many people would like a mySQL interface ?

Author
Message
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Dec 2002 13:32
Got MySQL (have also got Pervasive - but I dont think people would want to pay large quads of cash to use that in their programs, so we'll ignore that), and who would like to be able to use SQL commands in their DBPro programs ? If enough people want it, I might be able to do a plug-in for DBPro users...
Good news everyone! I really am THAT good...
Oh my, yes...
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 25th Dec 2002 21:47
A mySQL plug in would be very nice.

-Farwalk

Viktor
21
Years of Service
User Offline
Joined: 7th Oct 2002
Location: Austria
Posted: 25th Dec 2002 22:13
But making a mySQL database in DBP, that needs at least DirectX 8.1 and 8 Mb graphic card, is it not a bit perverted?

PC: AMD 1200/512 Mb SDR/GF2MX Dual Display/Win2000, 19" Monitor
ZX: Spectrum 128+ Customized version.
Current Project: BMP2SCR Pro (with LDIR)
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 25th Dec 2002 22:20
Not really...useful for multiplayer games

Good news everyone! I really am THAT good...
Oh my, yes...
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 26th Dec 2002 18:56
But making a mySQL database in DBP, that needs at least DirectX 8.1 and 8 Mb graphic card, is it not a bit perverted?
A bit.

But as the planned obsolescence that is WindowsPCs continues, after a year or so these requirements won't seem so bad. Unfortunately we live in today.

Also unfortunately the DBPro team will be creating new instabilities by incorporating DirectX9 and so on.

The more you see, the more you know.
The more you know, the more you see.
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 26th Dec 2002 18:58
Not really...useful for multiplayer games

Seriously, I doubt it.
Try to create a peer to peer multiplayer first.
Then you will see.

The more you see, the more you know.
The more you know, the more you see.
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2002 19:13
What has DX9 got to do with it?

Good news everyone! I really am THAT good...
Oh my, yes...
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 26th Dec 2002 20:50
That would be awesome mr TAToad.

Would it use ODBC? If so could it be tweaked to work with any ODBC compliant database (eg MS SQL Server, Access and Excel).
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Dec 2002 21:22
Yes - using ODBC would be the way to do it, I think...

Good news everyone! I really am THAT good...
Oh my, yes...
Rodro
21
Years of Service
User Offline
Joined: 17th Sep 2002
Location:
Posted: 27th Dec 2002 03:13
I'd like it! It will expand the DBP language. DBP will just not only be for "gaming". I'm creating a three card poker sim/analyzer. This will help me.

Hey!! You talking to me?
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 27th Dec 2002 20:46
Just to let you all know - its coming on well.. It's a generic ODBC SQL system, so it can/should be able to work with Excel, Pervasive, mySQL etc etc...

Good news everyone! I really am THAT good...
Oh my, yes...
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 28th Dec 2002 00:09
Glad to hear that, one of my favorite types of games are huge space empire games. Database connectivity would be a big plus in using DBpro in the future. After all, I'd rather work on the game instead of designing a database from scratch.
--
TAZ

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 30th Dec 2002 02:13
I've got a beta version on my web site - it should be usable will all ODBC drivers (FoxPro, Access, Pervasive) as well as mySQL.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 7th Jan 2003 22:30
Just wanted to report that I got the mySQL interface to work (using mySQL 4.0.7-gamma). Looks good so far, will work with it more.

-Farwalk

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Jan 2003 23:03
Ah! At last someones using it!

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Jan 2003 23:09
Let me know if there any problems...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 8th Jan 2003 19:31
Oh, and can you let me have the connection string, so I can add it to the list on my web site.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 8th Jan 2003 21:15
This is the connection string that I use.

x=SQLConnect("DRIVER={MySQL};SERVER=localhost;DATABASE=rpg;UID=farwalk;pwd=zzz;DNS=test",0)

Is there a way to improve performance? There is a brief but noticeable pause in the main loop of my program when this code is executed (this code is only executed once every 10 seconds):




-Farwalk

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 8th Jan 2003 21:32
I'll see what I can do - unfortunately, like a lot of Microsoft's stuff, ODBC is slow...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 8th Jan 2003 21:40
Have you got an E-Mail address for the modified version ? If not, I'll put in my web site.

What I've done is remove all the error checking I do for the Execute command - see if this improves it.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 8th Jan 2003 21:48
Its now at version 1.0.0.2

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 9th Jan 2003 03:54
That is improves the speed quite a bit. I will test it some more. Thanks.

-Farwalk

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 9th Jan 2003 13:04
What I'll probably do is have two versions of SQLExecute - one with full error protection and one without.

However, I would like to see if the C++'s try/throw is also slowing it down - so later on, I'll be updating the web site again with a new version. If you could give that a try as well, I'll be most grateful.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 9th Jan 2003 20:51
Okay, I've got 1.0.0.3 on my web site.

There is a new flag for the SQLSetError, which when set will ignore the check to make sure the database is open (which I think was the main problem).

See my web site etc etc...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 10th Jan 2003 20:19
Using the 1.0.0.3 version.

What would be the fastest error configuration?

SQLSetError ERROR_TOSCREEN || ERROR_NOERRORCHK,err,1024

SQLSetError ERROR_NOERROR || ERROR_NOERRORCHK,err,1024

SQLSetError ERROR_NOERROR,err,1024

SQLSetError ERROR_NOERRORCHK,err,1024

or something else?
Running the following test code shows that all 4 configurations are pretty much the same.



Speed issues may be in computer/mySQL configuration though. My work computer deals with mySQL commands in DBPro slower than my home computer even though my work computer is a more powerfull computer.

-Farwalk

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 10th Jan 2003 20:36
Yes, any configuration with ERROR_NOERRORCHK should be quicker than one without (possibly only by a small amount) - it wont matter what else you include.

If you want to display the error messages yourself, use
, otherwise


There are a whole load of mySQL options that may or may not effect the speed (personally I leave them alone).

What are your two configurations ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 10th Jan 2003 20:38
Certainly would be useful for a few things

Anata aru kowagaru no watashi!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 10th Jan 2003 20:39
Why not give it a try ??

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 10th Jan 2003 20:57
You may be interested in the source code for the SQL plug-in, which is now availiable.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Farwalk
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location:
Posted: 10th Jan 2003 21:12
I made an Access database and connected to it using the SQL plug in and it was 10-15 times faster than running it connecting to mySQL.

Connection String:

x=SQLConnect("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=rpg.mdb;SERVER=localhost;DATABASE=rpg.mdb",0)

Is the source code on your website?

-Farwalk

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 10th Jan 2003 22:36
Not surprised really, I think the code for mySQL is too generic and not really optimised for Windows

If you've got Pervasive, you could always try that (plus there are other free SQL databases out there).

The codes availiable in the code snippet section.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Jan 2003 22:10
I here some saying usefull? Never! Actually I have a project in pre-planning where MySql would be very usefull - I like to finish what I start though, and i'm currently busy doing exactly that on something else.

Pneumatic of Xev@EQ
God made the world in 7 days, but we're still waiting for the patch.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 12th Jan 2003 07:38
well mySQL is was developed to be multi-system whereas msSQL needs a Windows Based Os

i've not really got a great used for a database program right now, not in DarkBasic Pro atleast - however will come in useful with a few later ported projects
definatly worth playing about when i finally get time again

Anata aru kowagaru no watashi!

Login to post a reply

Server time is: 2024-05-18 18:09:55
Your offset time is: 2024-05-18 18:09:55