Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

sql.dll not working

Junior Spellweaver
Joined
Mar 10, 2009
Messages
194
Reaction score
2
Hi,

I am trying to get the sql.dll working for my server but when I use sql.dll I cant login it says unable to connect. but if I only but my id in it says wrong password.
I also checked the database but that just seems fine.
What could be the problem?

Greets,

Grimske1
 
Moderator
Staff member
Moderator
Joined
Feb 22, 2008
Messages
2,404
Reaction score
723
Make sure:

GPCode inside *GameUser table has this value: PTP-RUD001.
Grade: U.


Open SQL.dll in a hexadecimal editor. Search for Data Source= . Youll see a sql connection string. Edit it, so it can be like this one: Provider=SQLOLEDB;Initial Catalog=%s;Data Source=%s.

Now search for string ACCOUNTDB 12 times. Go up and down and you'll see several times, the same username,password and instance names. Edit it so it matches your SQL config.

Remember:

Instance name should be: COMPUTER_NAME\SQLEXPRESS
Make sure to enable remote connections in your SQL configuration, thru TCP/IP and NAMED PIPES. make sure also to open tcp dynamic port 1433 and to enable which IPS you want your sql to accept connections from.


 
Junior Spellweaver
Joined
Mar 10, 2009
Messages
194
Reaction score
2
Everything you said is checked but still same problem :S
 
Joined
Jul 24, 2006
Messages
883
Reaction score
581
I think I may have found the cause of sql.dll connection problems.
Microsoft Visual C++ Runtime Library is not installed.

I have managed to reproduce the Unable To Connect To Server error by removing "msvcr70.dll" and "sql.dll" from my server.
When I try to connect I get unable to connect.
So I created an odbc connection, could then connect fine.

Deleted odbc, unable to connect again. Put back "msvcr70.dll" and "sql.dll" and was able to connect fine again.

So I'd suggest installing

See how that goes.
 
Moderator
Staff member
Moderator
Joined
Feb 22, 2008
Messages
2,404
Reaction score
723
hmm.. nice discovery! I couldn't tell because one of the first app that I install on my pc after a fresh install is Visual Studio - hence all the libraries should be OK :p:

Makes sense, since some of my dlls compiled in VS C++ would require msvcr100.dll or 70.dll (100d.dll or 70d.dll, depending on the build config - Debug or Release). It can be removed, but it seems the developers didnt make that. =/
 
Joined
Jan 19, 2007
Messages
400
Reaction score
38
well, if u are running the server in a x64 SO, you will need tu put it in c:/windows/syswow64/
"msvcr70.dll"
test it again, and, the SQL.REG ( regedit file ) need to be configured to SO x64 too , u need to put this folder /syswow64/ in the tag.
but, i am sure the msvcr70.dll will fix it for u, make a easy test....
when te server gets up, u see any logs in C:/ , ( or ur folder logs) ????
 
Junior Spellweaver
Joined
Mar 10, 2009
Messages
194
Reaction score
2
there aint anny logs in c:/ or something i use a 32bit and tried to put it in sys32 also not working sunnyz tried installing Microsoft Visual C++ Runtime Library 2010 also nothing came out of that..
 
Joined
Jul 24, 2006
Messages
883
Reaction score
581
Ohh I figured it out.
You MUST use the default admin password.

I always used admin as the password for my account on my server (dun hack me bro)
And I also used admin as the default admin password *ADMIN_LOGIN

For some reason with the SQL.dll file you MUST login with the admin password to be able to connect.


Yeah just tested on my mates server who was having the same problem.
Will only let you login with the default admin password

Now we just have to find out WHY this is happening.

BTW, we are using Gregoos DLL generator with MPT server.
 
Last edited:
Joined
Jan 19, 2007
Messages
400
Reaction score
38
"
there aint anny logs in c:/ or something i use a 32bit and tried to put it in sys32 also not working sunnyz tried installing Microsoft Visual C++ Runtime Library 2010 also nothing came out of that..​



  • "
    this told me u need to put :
    in c:/windows/syswow64/
    "msvcr70.dll"

 
Junior Spellweaver
Joined
Mar 10, 2009
Messages
194
Reaction score
2
i finally got it fixed now but when i start bc after i configured towers for it etc, no towers get spawned and also no guards :S
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Deleted odbc, unable to connect again. Put back "msvcr70.dll" and "sql.dll" and was able to connect fine again.

So I'd suggest installing
I know this is a way back, but I only just spotted a problem with that suggestion. You can't install Visual C++ 2010 runtimes to fix a missing msvcr70.dll (Visual C++ 2003 ?)

The runtimes for Visual C++ 2003 where, apparently, distributed with .Net 1.1, which you will certainly need to have installed on your server, and you'll need to install the x86 version of them. (which may be very difficult indeed, as I suspect the installer will pick the most appropriate version for your CPU)

Good luck to you. :)
 
Back
Top