Pakku Posted July 12, 2006 Share Posted July 12, 2006 hi, i can't get this working i want to connect to a database (mysql) on my website i use the follow udf: http://www.autoitscript.com/forum/index.php?showtopic=20814 and this is my script: #include<MySQL.au3> _MySQLConnect("myusername", "mypassword","mydatabase","mywebsite.com") but when i run this (with the right data (password and username and stuff) in it) i get this error The requested action with this object has failed.: $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";") $ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")^ ERROR yes i use beta (newest) and i have installed the mysql ODBC 3.51 driver doe someone see the problem, i can't Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
jvanegmond Posted July 12, 2006 Share Posted July 12, 2006 (edited) Use: "http://www.mywebsite.com" Edit: if you're getting errors...i've found a good way to track em. this was in the idea lab, written by SvenP put this at the top: $objErr = ObjEvent("AutoIt.Error","MyErrFunc") and then this anywhere Func MyErrFunc() $hexnum=hex($objErr.number,8) Msgbox(0,"","We intercepted a COM Error!!" & @CRLF & @CRLF & _ "err.description is: " & $objErr.description & @CRLF & _ "err.windescription is: " & $objErr.windescription & @CRLF & _ "err.lastdllerror is: " & $objErr.lastdllerror & @CRLF & _ "err.scriptline is: " & $objErr.scriptline & @CRLF & _ "err.number is: " & $hexnum & @CRLF & _ "err.source is: " & $objErr.source & @CRLF & _ "err.helpfile is: " & $objErr.helpfile & @CRLF & _ "err.helpcontext is: " & $objErr.helpcontext _ ) exit EndFunc Edited July 12, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Pakku Posted July 13, 2006 Author Share Posted July 13, 2006 Hi, so my new script is: #include<mysql.au3> $objErr = ObjEvent("AutoIt.Error","MyErrFunc") Func MyErrFunc() $hexnum=hex($objErr.number,8) Msgbox(0,"","We intercepted a COM Error!!" & @CRLF & @CRLF & _ "err.description is: " & $objErr.description & @CRLF & _ "err.windescription is: " & $objErr.windescription & @CRLF & _ "err.lastdllerror is: " & $objErr.lastdllerror & @CRLF & _ "err.scriptline is: " & $objErr.scriptline & @CRLF & _ "err.number is: " & $hexnum & @CRLF & _ "err.source is: " & $objErr.source & @CRLF & _ "err.helpfile is: " & $objErr.helpfile & @CRLF & _ "err.helpcontext is: " & $objErr.helpcontext _ ) exit EndFunc _MySQLConnect("username", "password","database","website.com") the error message i now get is the follow: We intercepted a COM Error!! err.description is: [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'staringcorporation.nl' (10060) err.windescription is: Niet nader omschreven fout(this is dutch for: "undiscrible error" or something like that) err.lastdllerror is: 0 err.scriptline is: 27 err.number is: 80020009 err.source is: Microsoft OLE DB Provider for ODBC Drivers err.helpfile is: err.helpcontext is: 0 i'm using website.com and not http://www.website.com cause then i get unkown hostname and now i get can't connect so i think the hostname is right Arjan How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me 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