View previous topic :: View next topic |
Author |
Message |
Ponfyr
Joined: 18 Apr 2009 Posts: 20
|
Posted: Sat Oct 10, 2009 17:05 Post subject: Table doesn't exsist |
|
|
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 |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Sat Oct 10, 2009 18:22 Post subject: |
|
|
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 |
|
|
Asparius
Joined: 18 Sep 2007 Posts: 52
|
Posted: Sun Oct 11, 2009 18:52 Post subject: |
|
|
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 |
|
Back to top |
|
|
|