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 
 
Alot of questions
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Wed Nov 30, 2005 16:04    Post subject: Reply with quote

These are the new errors i am getting:

* An error occured during OnCreate of odbc

and

o Logfile maximum size limit is: 524288 bytes
o Log level: Everything will be logged.
o Using ODBC connection.
o Hooking SCO....hooked at 5c65d0
o Hooking RCO....hooked at 5c64b0
! Error while connecting to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT * FROM teleport WHERE Target = 'Fields' LIMIT 1;
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Disconnecting from database.


unfortunatly i have very little to no clue what it means
Back to top
View user's profile Send private message Send e-mail
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Wed Nov 30, 2005 21:13    Post subject: Reply with quote

"Data source name not found and no default driver specified" means that you set up the ODBC plugin of NWNX to use the ODBC connection type (check nwnx.ini how to configure that). It expects a data source called NWN in the default configuration, so you'd have to set that up in the Windows control panel.

I would rather use the direct MySQL connection or the easiest option: SQLite. ODBC is fine though.
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Primogenitor



Joined: 08 Jan 2005
Posts: 88

PostPosted: Thu Dec 01, 2005 11:39    Post subject: Reply with quote

SQLite is by far the easiest database option, particularly if your not sure what your doing. No passwords, no connections, no other applications to deal with. You dont even have to change the settings to enable it, since its the default. All the SQL syntax it recognises is documented at www.sqlite.org
Back to top
View user's profile Send private message
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Thu Dec 01, 2005 13:16    Post subject: Reply with quote

Right but the script is set to use mysql and I don't know how to modify and I have been over the info at http://www.nwnx.org/index.php?id=doc_odbc2 many many times...


Can we please start at the begining I really am a novice with little funds to hire a pro for a for fun server that is already coming out of my pocket. and I know I can do this I just need some help and a few basic questions answered in very plain manner.

1. If the script which I posted perviosly points to Mysql can I even use sqlite as you suggest?

2. If so I understand to download and get a working copy of mysql but please please please no one seems to answer this straight out...NWNX says to make a database but no where...WHERE does it go? In NWN folder..in the game scripts where? If so how? How do I make a database I have tried I have this in the mod in the scripts compiled but is that where the table goes? In the mod?
#include "aps_include"

void main()
{

SQLExecDirect("CREATE TABLE teleport(" +
"Id INTEGER( 10 ) UNSIGNED AUTO_INCREMENT PRIMARY KEY," +
"Spoken CHAR( 20 ) NOT NULL DEFAULT ''," +
"Target CHAR( 50 ) NOT NULL," +
"Familiarity CHAR( 20 ) NOT NULL," +
"FQHN CHAR( 255 ) NOT NULL DEFAULT 'localhost.localnet'," +
"Password CHAR(20) NOT NULL DEFAULT ''," +
"Direction ENUM ( 'None', 'Both', 'In', 'Out' ) NOT NULL DEFAULT 'Both'," +
"Random ENUM ( 'None', 'Both', 'In', 'Out' ) NOT NULL DEFAULT 'None';");
}
or am I doing it wrong?

Where does the 2da adapted database go...It was previously said i can't just make a text file and save it as a database so how do i make a database file? I tried using the tools connected to and i got a sql script file not a database file..are they the same thing? Please *begs* I am really confused at this point. I have tried my best to do all that was suggest and it still doesn't work. If I purged it all and sterted again could someone point me to a beginner walk through on databases,,tables and where the heck they go and how to make them?...Sorry getting a bit fustrated now on week three of 10 hour days of trying to make this work.
Back to top
View user's profile Send private message Send e-mail
Peskyone



Joined: 04 Nov 2005
Posts: 27

PostPosted: Thu Dec 01, 2005 13:17    Post subject: Reply with quote

Even the name of a good book for this I am more then willing to do the work on learning I just need to be pointed the right way.
Back to top
View user's profile Send private message Send e-mail
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Thu Dec 01, 2005 17:28    Post subject: Reply with quote

Peskyone wrote:

Can we please start at the begining I really am a novice with little funds to hire a pro for a for fun server that is already coming out of my pocket. and I know I can do this I just need some help and a few basic questions answered in very plain manner.

1. If the script which I posted perviosly points to Mysql can I even use sqlite as you suggest?

2. If so I understand to download and get a working copy of mysql but please please please no one seems to answer this straight out...NWNX says to make a database but no where...WHERE does it go? In NWN folder..in the game scripts where? If so how? How do I make a database I have tried I have this in the mod in the scripts compiled but is that where the table goes? In the mod?


Like I tried to explain back on page one Smile you DO NOT PUT A MYSQL DATABASE ANYWHERE. It is "stored" in MySQL's directories and accessed through the machine's internal networking. Repeat; YOU DO NOT "PUT" A MYSQL DATABASE ANYWHERE.... Clear? I don't want to sound rude, but there are some basic misconceptions about how databases work.... When you "create" a database in MySQL (via MySQLFront, command line, etc) that database is stored inside MySQL's directories and accessed through MySQL. When it says "Create a database" that is EXACTLY what it means, you use MySQL to create the database and MySQL keeps it. Don't confuse MySQL, Oracle, DB, Postgre and most other databases with something like Microsoft Access, they work differently....

I gave you a direct link to a FUNCTIONAL SQLite database, ready to use with NWNX. SQLite works differently than MySQL; Much like Access, you copy that database file into your NWNX folder then NWNX has the "server" process built into it that is needed to get to the information stored inside the database file. THIS IS NOT A TEXT FILE, it is not accessible through anything but an application that can directly support the database system. To turn on SQLite for NWNX, comment out (put a ; in front of) every line where it says anything about MySQL in the NWNX.INI file. The REMOVE the ; from the two lines where it says SQLite. This is the way the configuration file was originally setup on page one of this thread; you altered it to use MySQL.

As for your code, it should work with SQLite but some of the syntax might be a little different for auto-increment, etc. I haven't used it much except for some simple testing so I can't tell you instinctively what you will need to alter Smile You have a couple of options; one is to experiment and test your SQL syntax and alter it until it works correctly using the command line .exe file inside the ZIP that I gave you a link to. Second is to download an external utility like SQLITECC.EXE (link is on www.sqlite.org) and use it on the database I gave you the link to and make the table that way. SQLITECC is kindof link MySQLFront, its a graphical interface to assist in controlling your databases but works with SQLite instead of MySQL.

Books, there are no books on SQLite, your best bet is to throughly investigate their website. I think you need assistance beyond that though as I previously mentioned there are some basic concepts about databases you need to understand first. The book I normally use for MySQL has a reddish-maroon spine on it and is titled just "MySQL". Mine at work seems to have wandered off so I can't tell you author, etc. The other option is that MySQL's web site has a lot of information and basic instructions also. The "Core" series of books has one on MySQL that is decent also, as does O'Rielly..

Luck! If you really want to do this I think you need to do some reading and research to get some basic concepts down. Its not hard, but most people seem to either read too much into databases or not enough which can really confuse them Smile I think once you understand what is going on with these applications you will look back and just shake your head....
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related All times are GMT + 2 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
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