logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Connection Info

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Fri Jan 28, 2005 23:33    Post subject: Connection Info Reply with quote

Would it be possible, that SQLInit() would set an in-game variable, that stores the connection type (ODBC/MySQL/SQLite) and some version info in case of a successful initialization?

something like "NWNX!ODBC!INFO" with values like:
- "ODBC!v3!MSAccess"
- "MySQL!v4.1"
...
When the init fails, that var shouldn't exist. A simple "SELECT 1" could do the connection check.

The result could be used to select in-game the proper syntax for SQL commands like the "CREATE TABLE" statements.
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Jan 29, 2005 11:08    Post subject: Reply with quote

Yes, good idea. I would recommend doing it like this:

* ODBC2 checks for a table (e.g.) "nwnxinfo" and creates it if it does not exist yet.
* ODBC2 puts all relevant information into columns in that table
* aps_include is extended with functions that query these columns (SELECT dbtype FROM nwnxinfo).

Anybody up for this ?
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
NoMercy



Joined: 03 Jan 2005
Posts: 123
Location: UK

PostPosted: Sat Jan 29, 2005 16:55    Post subject: Reply with quote

Definately a feature I'd be interested in, though I doubt I'd be the one for the job... mabie if I get NWNX to build sometime, but alas I don't know my way around the tools well enough :/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group