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 
 
Problem setting up
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows technical support
View previous topic :: View next topic  
Author Message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Wed Dec 21, 2005 22:55    Post subject: Problem setting up Reply with quote

I recently tried to set up the NWNx database for SQLite. I followed the instructions that came with the download, but when i load the test module and try the different signs it says the following:

when i create the table in the database, it's succesfull according to the feedback in the game. There is no table in my database though

when i insert data into the table, it says it succeeded. There is no data.

when i retrieve the data from the tabl with the third sign it says it retrieved the string ".................................................................." Actualy it's even more dots. (this is the string for the database communications memory buffer, right?)

i adjusted the nwnx.ini file to refer to split.db, which is in my NWN folder. I created this file with SQLiteCC. When i put an empty nwnx.txt in my log.0 folder it remains empty.

nwnx_odbc.dll is in my nwn folder, Modified: Wednesday, February 02, 2005, 8:45:40 PM

my nwnx.ini file looks like this:

; NWNX2 ODBC2 example configuration file
; Copy the contents of this file to your nwnx.ini file and
; edit the parameters accordingly !

[ODBC2]

; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
source = SQLite
file = split.db

; Use these two settings for ODBC connections
;source = odbc
;dsn = nwn

; Use these five settings for MySQL connections
;source = mysql
;server = localhost
;user = nwn
;pwd = nwn
;db = nwn

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely

hookscorco = true


I also tried to code some SQL myself in a script in my own module. I execute an SQL select statement with the SQLExecDirect function from an empty table. The SQLFetch statement returns SQL_SUCCESS even though threre are no records....

this is all the info i could think of typing.... Could you help me out, i'm in the dark here...
Back to top
View user's profile Send private message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Thu Dec 22, 2005 0:00    Post subject: Reply with quote

What are the contents of the ODBC.LOG file? It will actually give the success or errors when the command is executed......
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Thu Dec 22, 2005 13:33    Post subject: Reply with quote

Where would i find this file?

I created an empty odbc.log and odbc.txt in the logs.0 folder, but they remain empty when i try the mod. When i perform a search i only find the files i created so the files don't exist anywhere else on my disks.
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Thu Dec 22, 2005 13:39    Post subject: Reply with quote

I also tried to put them in the logs folder... same result.
Back to top
View user's profile Send private message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Thu Dec 22, 2005 17:02    Post subject: Reply with quote

The ODBC log file is created automatically when NWNX is started.

How are you starting your module? Are you running the NWNX2.EXE file or by some other method? It sounds like you are just starting NWServer or starting the module from inside NWN; to use NWNX you HAVE to start the module through NWNX.....
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Thu Dec 22, 2005 17:30    Post subject: Reply with quote

*slaps forehead* stupid stupid stupid Wink That's it! Thanks, it's working now
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Thu Dec 22, 2005 18:00    Post subject: Reply with quote

It's working like a charm. I stored values and retrieved them Smile

It only worked with the database generated by NWNX though. If i create a database with SQLiteCC, the odbc log says it can't connect because it's not a database or the database is encrypted.

If i let NWNX create the database, i can't open it with SQLiteCC because it crashes on me. Should i use another version of SQLiteCC? I have v0.06. Or is there maybe another tool i can access the database with?
Back to top
View user's profile Send private message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Fri Dec 23, 2005 0:24    Post subject: Reply with quote

The dlls and such that are packed with NWNX use SQLite version 3.0.8 Its possible that SQLiteCC is making the database as a different version...

Do you have the SQLite3.exe file for the 3.0.8 version? If so you can use that to make the database via a command line, if not you can download it from my site:

http://nurrana.radcon.org/Downloads/sqlite.zip

The download includes the command line utility, the correct DLLs to match it and a functional sqlite database file.

Once you have made the database via the command line, SQLiteCC will correctly edit it and make changes while maintaining the original compatibility....
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Fri Dec 23, 2005 16:59    Post subject: Reply with quote

I downloaded your version. If i extract all the contents to a folder, open the sqlite.db with the sqlite3.exe command prompt tool and execute a select statement on the sqlite_master table i get the following message:

http://img493.imageshack.us/img493/8379/sqlite2xz.jpg

I did not open the sqlite.db file in the zip in SQLiteCC yet, so i guess the database in the zip file is from a newer version than the sqlite3.exe. SQLiteCC will open the file without problems though.
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Fri Dec 23, 2005 17:14    Post subject: Reply with quote

I tried another thing. I create a database with your sqlite3.exe (v3.0.8) and this is no problem:

http://img439.imageshack.us/img439/7901/sqlite22fs.jpg

Then when i try to open it with SQLiteCC it crashes:

http://img439.imageshack.us/img439/7234/sqlite39kq.jpg

I think the problem is in my SQLiteCC version. Do you perhaps have an older version?
Back to top
View user's profile Send private message
Acrodania



Joined: 02 Jan 2005
Posts: 208

PostPosted: Fri Dec 23, 2005 19:03    Post subject: Reply with quote

Yes, but not where I can get to it right now Sad

Try the "SQLite Database Browser" version 1.2
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Fri Dec 23, 2005 20:25    Post subject: Reply with quote

I searched on this forum some more and found a link to this site: http://home.student.uu.se/frax0795/ and there it was... the correct SQLiteCC version Very Happy (Here's a direct link to the download: http://home.student.uu.se/frax0795/sqlitecc-api3-exe.zip).

I made database with this SQLiteCC and i could use it in the SQLite3.exe v3.0.8 and vice versa. I also tried the database i made with SQLiteCC with my module. It worked! All the tools i need are there...

Thanks for the quick help!

PS. Maybe you should put this SQLiteCC version amongst your own downloads (If that's legal, which i think it is because it's freeware, right?)
Back to top
View user's profile Send private message
Mathos



Joined: 21 Dec 2005
Posts: 9

PostPosted: Fri Dec 23, 2005 21:29    Post subject: Reply with quote

Oh... and be carfull with rolling back transactions in SQLiteCC. I created a table in a transaction and then executed a rollback. The table will still show in the table list, but when you select it, SQLiteCC crashes....
Back to top
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Dec 24, 2005 18:47    Post subject: Reply with quote

The right version is linked in the NWNX: Links section. Maybe that should be pointed out in the documentation...
_________________
Papillon
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Sat Dec 24, 2005 18:49    Post subject: Reply with quote

Actually, it IS mentioned in the documentation... don't you guys ever read the manual Smile ?
_________________
Papillon
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 technical support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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