| Mirage Source http://miragesource.net/forums/ |
|
| RTE -2147467259 (80004005) http://miragesource.net/forums/viewtopic.php?f=201&t=3710 |
Page 1 of 1 |
| Author: | lifetotake [ Sun May 11, 2008 8:30 pm ] |
| Post subject: | RTE -2147467259 (80004005) |
Well, I was bored, and decided to make MirageSource server with MySQL work, but I hit a snag. I have ODBC 3.51 installed. I have MySQL 5.0.14 installed. I run WindowsXP (SP2).... I have every imaginable DLL and OCX file registered and I still get this error. I've searched google, and these forum, and no one has provided sufficient information that is useful. So I ask you all, how do I make this work?! I've tried everything I've found, to no avail. RTE -2147467259 (80004005): [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I debug and I get this highlighted: Code: Conn_Client.Open When I put a watch on Conn_Client, it shows 0 errors. Thanks, in advance. |
|
| Author: | Asrrin29 [ Sun May 11, 2008 8:36 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
There is a new ODBC driver out (5.1 I believe). Code: Public Const strCONN = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=127.0.0.1;DATABASE=mirage_online;UID=root;PWD=;OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384 is the correct string for the 5.2 driver. if you use 3.51 use that number instead. Also, make sure that the MySQL database service is running and that you have a database set up pre-populated with tables. If you need a blank database for a vanilla version of 3.0.7 let me know, I have it along with a working version of 3.0.7 debugged by verrigan. |
|
| Author: | lifetotake [ Sun May 11, 2008 9:04 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
Well, now I get a new error message... (Same RTE) RTE -2147467259 (80004005): Quote: Undefined error Before I got this... (Same RTE) RTE -2147467259 (80004005): Quote: Class not registered. btw, what is pre-population? I only know the basics about MySQL because I'm actually a php programmer. I only know about the basic querying of it. |
|
| Author: | Asrrin29 [ Sun May 11, 2008 9:53 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
if you are using any of the code present in the 3.0.7 source of MS then it is trying to reference tables that are not created in your MySQL database, and possibly the entire database itself. you need a database called mirage_online with tables for theings like classes, accounts, etc. and also columns in these tables for each of these objects properties like name, password, sprite, etc. If you'd like I can provide you a copy of a MySQL dump that has all these tables already created, and a vanilla version of 3.0.7 that has been bug fixed by verrigan to work out of box. |
|
| Author: | lifetotake [ Sun May 11, 2008 10:03 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
Oh, the database is created, and has the SQL dump imported. Even with all this, I still get "Class not registered" =/. (on a side note, I get the same problem with vbgore...) It seems that all MySQL connections with ODBC 3.51 and 5.1 just give me "Class not registered".. I registered a lot of files and also installed SP5 and SP6.... still got the "Class not registered" error =/ |
|
| Author: | Asrrin29 [ Mon May 12, 2008 12:30 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
ok, you need to have a few class modules added to your game, I forgot about those. don't know if you have them either. I have Code: AES.cls clsServer.cls clsSocket.cls clsSockets.cls RLE.cls If you need these classes let me know. |
|
| Author: | lifetotake [ Mon May 12, 2008 5:50 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
I already knew about "AES.cls" and "RLE.cls" was already there. "clsServer.cls, clsSocket.cls, clsSockets.cls" didn't come with the package. I don't think I'm actually missing classes... because, when I take the simplest code... like below: Code: Public DB_Conn As ADODB.Connection Public DB_RS As ADODB.Recordset Private Sub Form_Load() 'Create the database connection object Set DB_Conn = New ADODB.Connection Set DB_RS = New ADODB.Recordset DB_Conn.ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=localhost;DATABASE=projectdungeon;PORT=3306;UID=root;PWD=;OPTION=3" DB_Conn.CursorLocation = adUseClient DB_Conn.Open DB_RS.Open "SELECT * FROM banned_ips WHERE 0=1", DB_Conn, adOpenStatic, adLockOptimistic DB_RS.Close End Sub I get ![]() and debug highlighted this line: Code: DB_RS.Open "SELECT * FROM banned_ips WHERE 0=1", DB_Conn, adOpenStatic, adLockOptimistic The database contained the tables and all. I doubt "clsServer.cls, clsSocket.cls, clsSockets.cls" will do anything to fix the problem cuz it seems I'm having it with anything that uses ADO.... or maybe just ODBC mysql connector. I've even got the same problem with vbgore when I got around to testing it. Hook me up with "clsServer.cls, clsSocket.cls, clsSockets.cls" and I can just try adding them to see if I do happen to get any change. |
|
| Author: | Asrrin29 [ Mon May 12, 2008 7:27 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
Ok, lets make a checklist to make sure we have everything in place, just to make sure I'm not forgetting anything. First, you have MySQL 5.045 installed and running. Second, you have the ODBC connector driver version 5.1.4 installed. Third, you have properly declared your ADODB in your code Fourth, your connection string uses DRIVER={MySQL ODBC 5.1 Driver} instead of DRIVER={MySQL ODBC 3.51 Driver} As long as you have the latest connector and MySQL installed, as long as the code is right it should work. Try to uninstall and reinstall the connector and database to make sure they are installed properly. After that we will know it's definitely a problem in the code somewhere. |
|
| Author: | Asrrin29 [ Mon May 12, 2008 7:34 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
Here is my full code for declaring, initializing, and closing the database in my project. I don't know if it will help you, but you know your own code better then I do and maybe you can spot a discrepancy. Code: Option Explicit
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpString As String, ByVal lpfilename As String) As Long Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyname As Any, ByVal lpdefault As String, ByVal lpreturnedstring As String, ByVal nsize As Long, ByVal lpfilename As String) As Long 'Database Stuff Public Const strCONN = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=127.0.0.1;DATABASE=mirage_online;UID=root;PWD=;OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384 'Connections.... Public Conn_Server As ADODB.Connection Public Conn_Client As ADODB.Connection 'RecordSets Public RS_LoadPlayer As ADODB.Recordset Public RS_LoadChar As ADODB.Recordset Public RS_SavePlayerNEW As ADODB.Recordset Public RS_SavePlayerUPDATE As ADODB.Recordset Public RS_SaveCharNEW As ADODB.Recordset Public RS_SaveCharUPDATE As ADODB.Recordset Dim RS_LOGS As ADODB.Recordset Public Sub InitDB() 'Setup Connections Set Conn_Client = New ADODB.Connection Conn_Client.CursorLocation = adUseClient Conn_Client.ConnectionString = strCONN Conn_Client.Open Set Conn_Server = New ADODB.Connection Conn_Server.CursorLocation = adUseServer Conn_Server.ConnectionString = strCONN Conn_Server.Open 'Setup Connections 'Accounts Set RS_SavePlayerNEW = New ADODB.Recordset Set RS_SavePlayerUPDATE = New ADODB.Recordset Set RS_LoadPlayer = New ADODB.Recordset RS_SavePlayerNEW.Open "SELECT * FROM accounts LIMIT 1;", Conn_Client, adOpenStatic, adLockOptimistic 'Characters Set RS_SaveCharNEW = New ADODB.Recordset Set RS_SaveCharUPDATE = New ADODB.Recordset Set RS_LoadChar = New ADODB.Recordset RS_SaveCharNEW.Open "SELECT * FROM characters LIMIT 1;", Conn_Client, adOpenStatic, adLockOptimistic 'Logs Set RS_LOGS = New ADODB.Recordset RS_LOGS.Open "SELECT * FROM logs LIMIT 1;", Conn_Client, adOpenStatic, adLockOptimistic End Sub Public Sub CloseDB() 'Kill RecordSets 'Kill Logs RS_LOGS.Close Set RS_LOGS = Nothing 'Kill Characters RS_SaveCharNEW.Close Set RS_SaveCharNEW = Nothing Set RS_SaveCharUPDATE = Nothing 'Kill Accounts RS_SavePlayerNEW.Close Set RS_SavePlayerNEW = Nothing Set RS_SavePlayerUPDATE = Nothing 'Kill Connections Conn_Server.Close Set Conn_Server = Nothing Conn_Client.Close Set Conn_Client = Nothing End Sub |
|
| Author: | lifetotake [ Mon May 12, 2008 9:47 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
In that check list: Check First, you have MySQL 5.045 installed and running. Check Second, you have the ODBC connector driver version 5.1.4 installed. Check Third, you have properly declared your ADODB in your code Check Fourth, your connection string uses DRIVER={MySQL ODBC 5.1 Driver} instead of DRIVER={MySQL ODBC 3.51 Driver} Negative Does it work =/ I've looked thoroughly into this problem and it seems that I'm the only one with it. So it must just be something on my system causing it to not work properly, which I have no idea what could cause this. I'm just gunna give up with making VB6 work with MySQL. I pretty much just wanted to have a server function with MySQL, and I figure since I know I can do it with C++, I'll just move over to C++. I appreciate the attempt at helping me getting this fixed. |
|
| Author: | Asrrin29 [ Mon May 12, 2008 10:37 pm ] | ||
| Post subject: | Re: RTE -2147467259 (80004005) | ||
Here is the 3.0.7 code from verrigan. Try opening the server and seeing if it'll work. I just tested this on my machine and it works out of the box. both drivers (3.51 and 5.1) work with me, most likely because I have both installed, but just try it and see. At least this way you will know for sure it's your code or your machine.
|
|||
| Author: | lifetotake [ Mon May 12, 2008 11:25 pm ] |
| Post subject: | Re: RTE -2147467259 (80004005) |
I still get the same error. "Class not registered", like in that screen shot image that I posted. It's gotta be something wrong with ADO or my computer. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|