View previous topic :: View next topic |
Author |
Message |
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sat Jan 01, 2005 13:43 Post subject: NWNX ODBC ALPHA released! |
|
|
It is finally there: the NWNX ODBC plugin for NWNX 2.5! You can download it from the downloads page. Please us this topic to report any bugs (or successed ) you might have.
ps. Make sure that you read the 'readme.html' file before you start installing the new plugin on your system. |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Sat Jan 01, 2005 16:06 Post subject: |
|
|
Hello JeroenB,
I took a swift look at it and have some remarks on the logic of the .ini file.
You described in the readme, that it should look like:
ODBC wrote: | [DATASOURCE]
dns = nwndns |
MySQL wrote: | [DATASOURCE]
source = mysql
[LOGON]
server = localhost
user = your_user
pwd = your_pwd
db = nwn |
It looks a bit inconsistant to me and I'm afraid seeing people end up with a 'dsn' and a 'source' entry. I'd propose the follwing syntax:
ODBC wrote: | [DATASOURCE]
source = odbc
[LOGON]
dsn= nwndsn |
MySQL wrote: | [DATASOURCE]
source = mysql
[LOGON]
server = localhost
user = your_user
pwd = your_pwd
db = nwn |
Edit: it's DSN, not DNS
Last edited by Senalaya on Sat Jan 01, 2005 16:14; edited 2 times in total |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sat Jan 01, 2005 16:10 Post subject: |
|
|
Yeah, seems like a good idea. Thanks for the suggestions.
EDIT:
Arg.. it was bad documentation, as in the source file is was correctly implemented though as you suggested. I updated the files and rebuild/uploaded a new version, with the additional validation of the 'source' contents. |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Sat Jan 01, 2005 22:45 Post subject: |
|
|
Just checked again and found this:
Code: | iniFile.ReadString ("LOGON", "dns", buffer, 256, "nwn"); |
not meant to be picky, but it should be 'dsn' |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sun Jan 02, 2005 10:14 Post subject: |
|
|
Yes, seems the zip file didn't contain the right source file. Odd, I am positive that I updated it. Just checked: the pre-compiled version has the right dsn name . Let me check what went wrong with the source. |
|
Back to top |
|
|
Blayde Windwalker
Joined: 02 Jan 2005 Posts: 18
|
Posted: Mon Jan 03, 2005 1:24 Post subject: Pls Help |
|
|
I downloaded the lastes files decribed on the site and installed them as directed on my windows platform. I can get mysql running.
I then try and start up nwnx2 (with command line parms). NWNX2 starts and cycles the log file, loads up the NWN Server and appears fine.
However, Icheck the log file and I see :
* Loading modules...
* Extension functions is loaded.
* An error occured during OnCreate of odbc
* NWNX2 activated.
I try this with both mysql and ODBC and get the same results.
I have madCHook.dll, nwnx_functions.dll, nwnx_odbc.dll, nwnx-module.dll and nwnx_odbc.ini files installed in my NWN directory. (BTW - is that the correct name for the ini file? do i just rename the sql version to that name as appropriate? I have edited them to ensure they match my system)
nwnx_odbc.ini holds this when trying odbc:
[DATASOURCE]
source = odbc
[LOGON]
dsn = nwn
nwnx_odbc.ini holds this when trying mysql:
[DATASOURCE]
source = mysql
[LOGON]
server = localhost
user = nwnuser
pwd = nwnuser
Thanks for any assistance you can provide. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon Jan 03, 2005 2:30 Post subject: |
|
|
I also have the same problem of no connectivity.
Also it might be important to note that I never was able to get the nwnx_mysql.dll to work either. (I have been using the Fast French version of NWNX2 for WAY TOO LONG now and I want to get back to the original.) |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Mon Jan 03, 2005 10:37 Post subject: |
|
|
I release version 0.8.8 with some bugfixes, including the failure at loadtime. So, try again with the new version please |
|
Back to top |
|
|
Blayde Windwalker
Joined: 02 Jan 2005 Posts: 18
|
Posted: Mon Jan 03, 2005 20:39 Post subject: U posted wrong file |
|
|
Please update your download page. Instead of the Alpha version of the ODBC file, you have put a link to your profiler. It is listed twice now on the page.
Thanks. |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon Jan 03, 2005 21:46 Post subject: |
|
|
Ok from reviewing the error message and the source code the GetClassObject() for the nwxn_odbc.dll initialization is coming back fine but I am unsure what the statement if (!pbase->OnCreate(logdir)) is checking for. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Jan 03, 2005 23:35 Post subject: |
|
|
@Blayde Windwalker: I fixed the download link.
@Blacksting: It seems it dies while creating the log file. I mentioned to Jeroen yesterday how the new odbc module expects the receive the complete path + filename for the log file, while the offical nwnx module only passes the path to the modules. I guess he will fix that soon. Until that is done, you'll either need to fix the sourcecode or wait till that has been changed. _________________ Papillon |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 0:00 Post subject: |
|
|
@Blacksting & Papillon: The nwnx-modules.dll only supplies the log directory. This is where the logDir comes from. In the OnCreate of the plugin the following happens: before we pass the dir on to the OnCreate of the base class, I add the file name of the log file for this module. Then I pass the complete path of the log file to the CNWNXBase::OnCreate which actually tries to create the file. This will only fail when there is no diskspace or the path is invalid (which should happen).
The test in the nwnx-module.dll file makes sure that the plugin is correctly loaded. If something failed we don't remember the plugin in the hashtable. |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Jan 04, 2005 0:06 Post subject: |
|
|
Right, I thought it was still the previous version where it assumes to receive the path including the filename. Forget about that, that's apparently not the problem. _________________ Papillon |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Jan 04, 2005 0:14 Post subject: |
|
|
In any case the "check" for the log directory returns an error. Where do I go from there to find out why? Plenty of disk space... all the other log files exist without error.
GetClassObject = (GETCLASSOBJECT)GetProcAddress(hDLL, "GetClassObject");
if (GetClassObject != NULL)
{
CNWNXBase* pBase = GetClassObject();
if (pBase)
{
if (!pBase->OnCreate(logDir))
fprintf(logFile, "* An error occured during OnCreate of %s\n", moduleName);
else
fprintf(logFile, "* Extension %s is loaded.\n", moduleName);
Libraries.Insert(strupr(moduleName), pBase); <------- library is inserted whether the log is created or not.... but obviously pBase is not working as it should
}
else
fprintf(logFile, "* Could not create an instance of module %s", moduleName);
}
else
{
fprintf(logFile, "* Error: can not find creation function in %s\n", findData.cFileName);
}
} |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Tue Jan 04, 2005 0:21 Post subject: |
|
|
Did you download the newest version 0.8.8? |
|
Back to top |
|
|
|