View previous topic :: View next topic |
Author |
Message |
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Tue Aug 09, 2005 6:40 Post subject: Trying to follow data NWN => MySQL and back |
|
|
Hi, I just installed NWNX, MySQL and set up an ODBC connection; when I run the demo mod, it mostly seems to be working, however when I look at the nwn DB in MySQL query browser I don't see any new data. Just to be sure I added the following to the demo_createtable script:
// Testing...
SQLExecDirect("CREATE TABLE test_table (" +
"player varchar(64) NOT NULL default '~'," +
"tag varchar(64) NOT NULL default '~'," +
"name varchar(64) NOT NULL default '~'," +
"test_field_1 varchar(64) NOT NULL default '~'," +
"PRIMARY KEY (player,tag,name)" +
") ENGINE=MyISAM DEFAULT CHARSET=latin1;");
I figured I'd know I was on the right track if I could at least see a new table called "test_table" after running through the demo mod... but no luck.
I've had the NWNX2.exe up and running prior to starting the mod in NWN, and have confirmed that the log files all appear to show clean connection messages, so I'm not sure what I'm missing.
I've been over the docs several times but haven't seen anything about this.
Has anyone encountered this sort of thing - or know of a simpler way to test out the SQL functionality in re: storing data and calling same via SELECT statement or something along those lines? |
|
Back to top |
|
|
Primogenitor
Joined: 08 Jan 2005 Posts: 88
|
Posted: Tue Aug 09, 2005 10:13 Post subject: |
|
|
Have you tried using SQLite instead of MySQL? No setup required, so its one less thing to go worng. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Aug 09, 2005 19:03 Post subject: |
|
|
Please post the contents of nwnx_odbc.txt. _________________ Papillon |
|
Back to top |
|
|
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Tue Aug 09, 2005 22:39 Post subject: |
|
|
Taken from C:\NeverwinterNights\NWN\logs.0\nwnx_odbc.txt:
NWNX ODBC2 plugin V.0.9.2.4
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org
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
o Connect successful.
o Disconnecting from database. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Wed Aug 10, 2005 14:14 Post subject: |
|
|
Looks like you did not try to run the demo module, since the log file contains no SQL commands.... please try that and post the resulting log file again. _________________ Papillon |
|
Back to top |
|
|
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Wed Aug 10, 2005 19:56 Post subject: |
|
|
I did run the demo module, as noted above - follows are my exact steps:
1) Ran NWNX2.exe
2) Ran nwmain.exe => new => aps_demo
3) Went over to each of the 3 small signs on the left; the value it returned was "-------- (etc)" instead of "testvalue"
4) Went over to each of the 3 small signs on the right; last of which said "storing 1 object", and then when I opened the chests I found 3 objects in the first one (armor, sword & scroll), and 1 item in the 2nd chest (armor)
Instructions were a bit vague in this area; were there other steps I should have done? Should I have gone into "multiplayer" instead of regular modules area? |
|
Back to top |
|
|
Primogenitor
Joined: 08 Jan 2005 Posts: 88
|
Posted: Thu Aug 11, 2005 9:35 Post subject: |
|
|
NWNX2.exe should load NWSever.exe for you, you dont normally have to start it separately. |
|
Back to top |
|
|
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Thu Aug 11, 2005 14:21 Post subject: |
|
|
I am trying to be very clear in my posts, so that someone can read them and tell me what the problem is.
But you guys are not completely reading my posts.
Papillon - I said that I ran the module in my first post. You're right; no SQL queries in my nwnx_odbc.txt file. Can you read my last post listing what I did to get the module running, and tell me if I did anything wrong?
Primogenitor - I said I ran NWNX2.exe and nwmain.exe. Never said I manually ran nwserver.exe (and yes, when I started NWNX2.exe, nwserver.exe was also activated).
The problem may be that I am not familiar enough with nwserver.exe - there is a drop box featuring "aps_mod" and a load button next to it - which is grayed out; not sure if I'm supposed to be doing everything through NWNX2.exe/nwserver.exe but again if so why is the load button grayed out? |
|
Back to top |
|
|
pdwalker
Joined: 09 Aug 2005 Posts: 22
|
Posted: Thu Aug 11, 2005 16:18 Post subject: |
|
|
1/ the box is greyed out because it has loaded the mod and is running it.
2/ your odbc log says that no query is run. You need to go back into your mod scripts and find out why they are not being run.
3/ in your previous post, you say you have loaded your client (nwmain.exe) and ran the mod locally (by selecting the aps_mod module). If this is the case, then your problem is simple. You need to run the client and connect to the local lan server (in this case the launched nwnx2 and nwserver) instead of running the mod under the instance of your client.
nwnx2 watches nwserver.exe, not nwmain.exe.
Lastly, be polite. The people trying to help you cannot see your computer screen and don't know exactly what you have done. Have patience.
- Paul |
|
Back to top |
|
|
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Thu Aug 11, 2005 22:00 Post subject: |
|
|
1/ the box is greyed out because it has loaded the mod and is running it.
==> Where is it being run? Until I open nwmain.exe, the only apps running are NWNX2.exe and nwserver.exe?
2/ your odbc log says that no query is run. You need to go back into your mod scripts and find out why they are not being run.
==> According to the documentation the demo mod should be ready to go once a connection has been established - my log file shows a successful connection, so I posted here as this did not appear to be covered by the docs (i.e. if this was explained in the docs it wouldn't have been necessary for me to post here).
3/ in your previous post, you say you have loaded your client (nwmain.exe) and ran the mod locally (by selecting the aps_mod module). If this is the case, then your problem is simple. You need to run the client and connect to the local lan server (in this case the launched nwnx2 and nwserver) instead of running the mod under the instance of your client.
nwnx2 watches nwserver.exe, not nwmain.exe.
==> Do you know which files should I be running and in what order? As mentioned I ran NWNX2.exe first, which opened nwserver.exe, and it stopped there - which is why I manually opened nwmain.exe at that point?
Lastly, be polite. The people trying to help you cannot see your computer screen and don't know exactly what you have done. Have patience.
==> You got me scratching my head on that one - what part of my posts do you consider "impolite" |
|
Back to top |
|
|
scott1uol
Joined: 09 Aug 2005 Posts: 6
|
Posted: Thu Aug 11, 2005 22:16 Post subject: |
|
|
Also, you're saying that my load button on nwserver.exe is greyed out because it is running the aps_demo module, while Papillon is saying that my nwnx_odbc.txt log file shows that I was not running that module.
Eh...? |
|
Back to top |
|
|
pdwalker
Joined: 09 Aug 2005 Posts: 22
|
Posted: Fri Aug 12, 2005 2:29 Post subject: |
|
|
Have you ever connected to an online game with nwn?
...
oh heck, make it simple.
After you start nwnx2 (which then loads immediately nwserver.exe) you have to connect to the server with nwmain.exe (the client). You do not load a local mod.
The way to do this is to select the multiplayer option, lan and not start a new game.
Or, you can run nwmain directly and tell it to connect to your server directly, like this:
nwmain.exe +connect 127.0.0.1
(assuming the client runs on the same machine on the server)
What you are in effect doing is running two copies of your mod. One copy is with nwserver.exe, which has db access through nwnx2 and you are not connecting to. The other copy is through nwmain.exe which has no db access.
That is why your odbc log comes up empty.
Stop trying to run the mod locally through nwmain.exe. Use you client to connect to your running server.
- Paul |
|
Back to top |
|
|
xtrick8
Joined: 31 Jul 2006 Posts: 8 Location: Melbourne, Australia
|
Posted: Mon Jul 31, 2006 6:18 Post subject: |
|
|
What user are you using in MySQL. Can you make sure you are not using the information_schema. You should be connecting to nwn or mysql and you need to make sure that user has full access to create, delete, select etc... I would follow what these guys are telling you to do. The demo should come up and say 3 objects stored in database, 3 objects retrieved from database in the status window. IF that isnt the case, then it is likely a mySQL problem with permissions, or an ODBC connection issue. Post us your nwnx.ini file and your ODBC settings (minus the password pls). _________________ - xtrick8 (Lead Writer for Noreshia)
http://www.noreshia.com/ |
|
Back to top |
|
|
DM_GoodTime
Joined: 02 Nov 2005 Posts: 5 Location: fairbanks, alaska
|
Posted: Fri Sep 29, 2006 5:43 Post subject: i need helpt with mysql and odbc set up |
|
|
i have the mysql server installed but it not connecting any help will be great
this my log.0
nwnx_odbc
NWNX ODBC2 plugin V.0.9.2.4
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org
o Logfile maximum size limit is: 524288 bytes
o Log level: Everything will be logged.
o Using ODBC connection.
o Hooking SCO....hooked at 5d3560
o Hooking RCO....hooked at 5d3440
! Error while connecting to database: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: DROP TABLE pwdata
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: CREATE TABLE pwdata (player varchar(64) NOT NULL default '~',tag varchar(64) NOT NULL default '~',name varchar(64) NOT NULL default '~',val text,expire int(11) default NULL,last timestamp NOT NULL default CURRENT_TIMESTAMP,PRIMARY KEY (player,tag,name)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT player FROM pwdata WHERE player='D~axes' AND tag='Dunge Onmaster' AND name='demoName'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Empty set
o Got request: INSERT INTO pwdata (player,tag,name,val,expire) VALUES('D~axes','Dunge Onmaster','demoName','testValue',0)
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT val FROM pwdata WHERE player='D~axes' AND tag='Dunge Onmaster' AND name='demoName'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Empty set
o Got request: DROP TABLE pwobjdata
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: CREATE TABLE pwobjdata (player varchar(64) NOT NULL default '~',tag varchar(64) NOT NULL default '~',name varchar(64) NOT NULL default '~',val blob,expire int(11) default NULL,last timestamp NOT NULL default CURRENT_TIMESTAMP,PRIMARY KEY (player,tag,name)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT player FROM pwobjdata WHERE player='~' AND tag='Chest1' AND name='Item_0'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Empty set
o Got request (scorco): INSERT INTO pwobjdata (player,tag,name,val,expire) VALUES('~','Chest1','Item_0',~s,0)
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT player FROM pwobjdata WHERE player='~' AND tag='Chest1' AND name='Item_1'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Empty set
o Got request (scorco): INSERT INTO pwobjdata (player,tag,name,val,expire) VALUES('~','Chest1','Item_1',~s,0)
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request: SELECT player FROM pwobjdata WHERE player='~' AND tag='Chest1' AND name='Item_2'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Empty set
o Got request (scorco): INSERT INTO pwobjdata (player,tag,name,val,expire) VALUES('~','Chest1','Item_2',~s,0)
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Got request (scorco): SELECT val FROM pwobjdata WHERE player='~' AND tag='Chest1' AND name='Item_0'
! SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
o Disconnecting from database.
this my nwnx.ini file
; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command
; line take precedence.
[NWNX]
ServerPort = 5121
ModuleName = "aps_demo"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = no
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5
[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything
; Use these two settings for ODBC connections
;source = myodbc
;dsn = nwn
; Use these five settings for MySQL connections
;source = myodbc
;server = localhost
;user = root
;pwd = xxxxxx
;db = NWN.db
; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true
[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Fri Sep 29, 2006 12:47 Post subject: |
|
|
It tries to connect via the ODBC path:
Quote: | [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified |
Remove the ; characters below the
Quote: | ; Use these five settings for MySQL connections |
line. Right now, they are commented out and not read by NWNX. _________________ Papillon |
|
Back to top |
|
|
|
|
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
|