Clay Posted August 6, 2008 Share Posted August 6, 2008 I am using the following UDF with a MySQL ODCB 5.1 Driver on a Window XP 64 bit Os. I Configured my System DSN to produce a successful connection, however when I attempt to return results using the UDF I get an error... "The requested action with this object has failed" when an attempt is made of open the connection at the following line $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT="&$iPort) Func _MySQLConnect($sUsername, $sPassword, $sDatabase, $sServer, $sDriver = "{MySQL ODBC 5.1 Driver}", $iPort=3306) Local $v = StringMid($sDriver, 2, StringLen($sDriver) - 2) MsgBox(0, "", $v ); DEBUG MsgBox(0, "", $sDriver ); DEBUG Local $key = "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers", $val = RegRead($key, $v) MsgBox(0, "", $val ); DEBUG If @error or $val = "" Then SetError(2) Return 0 EndIf $ObjConn = ObjCreate("ADODB.Connection") $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";PORT="&$iPort) If @error Then SetError(1) Return 0 Else Return $ObjConn EndIf EndFunc ;==>_MySQLConnect I can not even create a connection despite having the proper DSN .... I obviously do obviously do not know why this is happening because I do have all the proper arguments passed to the fuction..... any ideas anyone I looked through a few forums, however in most it seems that atleast connections have been made, so I know this is possible .. its just pissing me off. Link to comment Share on other sites More sharing options...
Clay Posted August 6, 2008 Author Share Posted August 6, 2008 .. in otther words I have the ODBC 5.1 Driver installed but I can not seem to get a connection when using the UDF Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 6, 2008 Share Posted August 6, 2008 Can you connect manually from that client, to that server, using those credentials? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MatteoGuallini Posted October 30, 2008 Share Posted October 30, 2008 I've exactly the same problem. I've tried to connect to server using a client like HeidiSQL and it runs correctly. Have you some hints? http://www.vigevano-prabis.it/ Link to comment Share on other sites More sharing options...
dbzfanatic Posted October 30, 2008 Share Posted October 30, 2008 You have to have the 3.5 version as well. Did you try installing that driver and testing? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
MatteoGuallini Posted October 30, 2008 Share Posted October 30, 2008 You have to have the 3.5 version as well. Did you try installing that driver and testing?The driver version I've installe is 3.51.26.00. The driver appears on the list of ODBC driver. The OS is WinXP. I've already tried to restart the system. The same installation on another my PC runs correctly. Thanks http://www.vigevano-prabis.it/ Link to comment Share on other sites More sharing options...
subfighter Posted November 13, 2008 Share Posted November 13, 2008 i have the same problem and tested locally and on the internet same issue.. i am using 5.1 is that that problem? Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 13, 2008 Share Posted November 13, 2008 That's odd. I have this UDF and the 3.5 driver and it works perfectly for me. Show us what code you have so far,maybe it's an error in coding. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
SoulA Posted November 13, 2008 Share Posted November 13, 2008 I tried putting this together on my machine which is running vista 64bit and the driver had errors as well. On another system running xp 32bit the udf and driver worked perfectly. Does this have to be run on that particular machine? Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 13, 2008 Share Posted November 13, 2008 You have to ensure the driver is the correct version and type for the system. 64 bit OSes require 64 bit drivers, and 32 requires 32. Just make sure that things are in proper order. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
subfighter Posted November 13, 2008 Share Posted November 13, 2008 my problem was there is a new version of the UDF.. once i installed it no problem.. connectedI think we are using 2 different versions of the UDF.You probably got the file from here:http://www.autoitscript.com/forum/index.ph...14&hl=mysqlThere is a little link in that first post that says:I have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysql now at revision:I use the version from here:http://kan2.sytes.net/publicsvn/mysql/I believe the order of the parameters changed in that newer version. Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 13, 2008 Share Posted November 13, 2008 Ah, I see. I have been using the newest and I guessed you had noticed and were using that UDF as well. I guessed wrong apparently. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now