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 
 
Table doesn't exsist

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



Joined: 18 Apr 2009
Posts: 20

PostPosted: Sat Oct 10, 2009 17:05    Post subject: Table doesn't exsist Reply with quote

I keep seeing: ! SQL Error: Table 'nwndb.subrace' doesn't exist - in my nwnx_odbc.txt log

Everything else seems to be working. But I cannot find any reference to a table named 'subrace' in my scripts.

Is there any way to turn up the logging verbosity on the odbc plug-in? I am hoping to find what script calls this...

A string search just on subrace has hundreds of hits and "subrace" gets no hits.
Back to top
View user's profile Send private message
Fireboar



Joined: 17 Feb 2008
Posts: 323

PostPosted: Sat Oct 10, 2009 18:22    Post subject: Reply with quote

You can't as far as I know log what script called a SQL query. What you should do instead is look at queries just before or after the one that's causing the error, to see if there's any pattern and try and trace down the problem. Or introduce trace debug lines into your script (WriteTimestampedLogEntry) and compare the timestamps.
Back to top
View user's profile Send private message
Asparius



Joined: 18 Sep 2007
Posts: 52

PostPosted: Sun Oct 11, 2009 18:52    Post subject: Reply with quote

Function GetScriptName would be handy in this situation, but since we don't have it (yet), I thik we can use another solution:

Modify function SQLExecDirect in aps_include:

Code:

void SQLExecDirect(string sSQL)
{
    if (FindSubString (sSQL, "subrace") > -1)
        PrintString ("ERROR::Script ran subrace query");

    SetLocalString(GetModule(), "NWNX!ODBC!EXEC", sSQL);
}


Then add / change lines in nwnplayer.ini
Code:

[Script Options]
Enable Profiling=0
Enable Logging=1


Save, recompile all scripts and run. You should see something like this in log:

Code:

[1] Object: "", Running Script: mysqlcreate
ERROR::Script ran subrace query


And now you can see the culprit Smile
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
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