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 Creating Table

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
Massocre



Joined: 26 Feb 2005
Posts: 2

PostPosted: Sat Feb 26, 2005 8:41    Post subject: Problem Creating Table Reply with quote

Hi:

I run a PW that I wanna add persistance too using NWNx2 and MySQL. I decided to add a "player owned housing system" by f0wl Cr0w, which creates tables as players buy the houses. When testing, the nwnx2_odbc log gave me this error:

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 MySQL connection.
o Hooking SCO....hooked at 5c4320
o Hooking RCO....hooked at 5c4200
o Connect successful.
o Got request: SELECT ResRef FROM hearthdaleplayerhousing WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Got request: SELECT Facing FROM hearthdaleplayerhousing WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Got request: SELECT ResRef FROM shack_a1 WHERE FurnID='00000'
o Got request: UPDATE hearthdaleplayerhousing SET Facing='' WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Disconnecting from database.

Can someone possibly help me out with understanding what is wrong?
Back to top
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sat Feb 26, 2005 10:59    Post subject: Reply with quote

It seems that your table is not yet been made. I assume you know what the SELECT statement does, it wants to fetch data from a table that does not exist. So, you must first create the table in your nwn database.
Back to top
View user's profile Send private message Visit poster's website
Massocre



Joined: 26 Feb 2005
Posts: 2

PostPosted: Sat Feb 26, 2005 11:10    Post subject: Reply with quote

Well, the idea is that the tables make themselves from the mod. When i went to MySQL control panel, I saw the new table it made (called shack_a1) but no info was stored....

If I have to make the table manually, what one to make? "hearthdaleplayerhousing"? How do I do that exactly? I can do fair scripting, but this DB stuff is very new.
Back to top
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sun Feb 27, 2005 10:39    Post subject: Reply with quote

As far as I can tell, the shack_a1 table was not the one you were refering to in the first post (hearthdaleplayerhousing). Also, SQL doesn't create tables on itself. You must create a statement like:

Code:
CREATE TABLE hearthdaleplayerhousing ( owner TEXT(100), ... )

Otherwise no table is created, and you can never store or retreive information from that database.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related 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