View previous topic :: View next topic |
Author |
Message |
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 0:29 Post subject: |
|
|
yes this happens in the newest version... I just redownloaded to make sure
! Error while connecting to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
in the nwnx_odbc.txt
* Loading modules...
* Extension functions is loaded.
* Extension hashset is loaded.
* Extension leto is loaded.
* An error occured during OnCreate of odbc
* Extension system is loaded.
* NWNX2 activated.
in the nwnx.txt
[DATASOURCE]
source = mysql
[LOGON]
server = localhost
user = root
pwd =
db = nwn
in the mysq_odbc.ini |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 0:31 Post subject: |
|
|
Ah, there is nothing wrong with the module. What is your contents of the nwnx_odbc.ini file? I see you are using an ODBC connection, so you must have a DSN declared with either the name NWN or the one you supplied in the ini file (in LOGON part the DSN option). |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 0:37 Post subject: |
|
|
The documentation states the mysql_odbc.ini is the name of the file whether you use mysql or not.
I am running direct MySQL not ODBC. In the previous posts the other person with the problem ran both just to make sure. They both failed.
Does the error message in the nwnx_odbc.txt change if the source is MySQL? If so we have found the problem. The module is not choosing MySQL (but that still does not explain the failing of the ODBC either.) |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 0:45 Post subject: |
|
|
Could you please post the contents of the ini file here?
EDIT: remove any sensitive information like passwords etc! |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 0:49 Post subject: |
|
|
The listing in the above post is the ENTIRE ini file.
[DATASOURCE]
source = mysql
[LOGON]
server = localhost
user = root
pwd =
db = nwn
is there more that needs to be in there? |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 0:52 Post subject: |
|
|
Sorry .. I didn't look very well, my fault. Let me see what I can make of this.
EDIT: about the contents of the nwnx_odbc log file: is this all? what does it say above version, which database did it use?
EDIT again :s: stupid sentence.. please list the complete contents of the nwnx_odbc.txt file. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 1:12 Post subject: |
|
|
NWN Extender V.2.5.4.0
(c) 2004 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org
* Loading modules...
* Extension functions is loaded.
* Extension hashset is loaded.
* Extension leto is loaded.
* An error occured during OnCreate of odbc
* Extension system is loaded.
* NWNX2 activated.
THIS IS THE BEGINNING OF THE FILE
NO HEADER INFORMATION
! Error while connecting to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT Value FROM global WHERE VarName='GAnim1'¬................................................................................................................................................................................................................
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT Value FROM global WHERE VarName='GAnim2'¬................................................................................................................................................................................................................
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT value FROM misc WHERE name='SessionDaysKept'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Sent response (-1 bytes):
o Got request: SELECT value FROM misc WHERE name='TimeStampWest'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Sent response (-1 bytes): |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 1:21 Post subject: |
|
|
This is really odd. Could you please list the size of the nwnx_odbc.dll file?
EDIT: i suspect that you downloaded the stable nwnx_odbc_254 package, this is the old version though, and you need the ALPHA release below. The correct size should be around 96 kb. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 1:34 Post subject: |
|
|
That was the answer.
The file was 64k. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Fri Jan 07, 2005 2:30 Post subject: |
|
|
Now that I have it working I want to add some things to the nwnx_odbc.dll. I am having a very hard time getting it to recompile though.
The solution file is "not valid" for Visual Studio 7 so I tried to move it in to the NWNX2 solution with lots of header problems.
Any suggestions? |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Fri Jan 07, 2005 6:41 Post subject: |
|
|
A few examples of my compiler woes:
virtual BOOL Execute (const uchar* query) = 0;
virtual uint Fetch (char* buffer, uint size) = 0;
d:\Development\Visual Studio\NWNX2\nwnx_odbc\db.h(31): error C2143: syntax error : missing ',' before '*' ==== for the two lines above .....
as well as later
d:\Development\Visual Studio\NWNX2\nwnx_odbc\mysql.h(37): error C2501: 'CMySQL::uint' : missing storage-class or type specifiers
uint does not seem to compile.... any thoughts?
iniFile.ReadString ("DATASOURCE", "source", buffer, 256, "ODBC");
d:\Development\Visual Studio\NWNX2\nwnx_odbc\NWNXOdbc.cpp(100): error C2228: left of '.ReadString' must have class/struct/union type
I have a feeling that one compiler switch or proper header file somewhere will make all of these fall in to line. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Jan 07, 2005 9:50 Post subject: |
|
|
Try this:
Code: |
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned char uchar;
|
I had the same problems with the new odbc code The next version will fix these issues. _________________ Papillon |
|
Back to top |
|
|
Manuel
Joined: 30 Dec 2004 Posts: 51
|
Posted: Sat Jan 08, 2005 0:16 Post subject: |
|
|
That's why it's Alpha... We need cool people, like you all, to help identify and squash bugs. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Sat Jan 08, 2005 0:25 Post subject: |
|
|
What about the CIniFile identifier? Is that class header missing? Where does it come from? |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sat Jan 08, 2005 10:23 Post subject: |
|
|
Didn't I include the newest version of the baseclass files? It should have the ini file class incorporated and also those defines listed by papillon. |
|
Back to top |
|
|
|