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 
 
NWNX ODBC ALPHA released!
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sat Jan 01, 2005 13:43    Post subject: NWNX ODBC ALPHA released! Reply with quote

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 Wink) 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
View user's profile Send private message Visit poster's website
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Sat Jan 01, 2005 16:06    Post subject: Reply with quote

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 Razz


Last edited by Senalaya on Sat Jan 01, 2005 16:14; edited 2 times in total
Back to top
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sat Jan 01, 2005 16:10    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Sat Jan 01, 2005 22:45    Post subject: Reply with quote

Just checked again and found this:

Code:
iniFile.ReadString ("LOGON", "dns", buffer, 256, "nwn");


not meant to be picky, but it should be 'dsn' Razz
Back to top
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Sun Jan 02, 2005 10:14    Post subject: Reply with quote

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 Smile. Let me check what went wrong with the source.
Back to top
View user's profile Send private message Visit poster's website
Blayde Windwalker



Joined: 02 Jan 2005
Posts: 18

PostPosted: Mon Jan 03, 2005 1:24    Post subject: Pls Help Reply with quote

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
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon Jan 03, 2005 2:30    Post subject: Reply with quote

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
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Mon Jan 03, 2005 10:37    Post subject: Reply with quote

I release version 0.8.8 with some bugfixes, including the failure at loadtime. So, try again with the new version please Smile
Back to top
View user's profile Send private message Visit poster's website
Blayde Windwalker



Joined: 02 Jan 2005
Posts: 18

PostPosted: Mon Jan 03, 2005 20:39    Post subject: U posted wrong file Reply with quote

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
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Mon Jan 03, 2005 21:46    Post subject: Reply with quote

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
View user's profile Send private message
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Mon Jan 03, 2005 23:35    Post subject: Reply with quote

@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
View user's profile Send private message Visit poster's website MSN Messenger
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Tue Jan 04, 2005 0:00    Post subject: Reply with quote

@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
View user's profile Send private message Visit poster's website
Papillon
x-man


Joined: 28 Dec 2004
Posts: 1060
Location: Germany

PostPosted: Tue Jan 04, 2005 0:06    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Tue Jan 04, 2005 0:14    Post subject: Reply with quote

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
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Tue Jan 04, 2005 0:21    Post subject: Reply with quote

Did you download the newest version 0.8.8?
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 -> General Discussion All times are GMT + 2 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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