Bounda Posted April 16, 2006 Share Posted April 16, 2006 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 the ^error is supposed to be pointing at the C on Objconn but it wouldnt work wit code or quote i was just trying teh function too x . x CS:S Aimbot - List From INI Funcs Link to comment Share on other sites More sharing options...
Valuater Posted April 16, 2006 Share Posted April 16, 2006 maybe test the output so you can see if it is correct MsgBox(0,'',"DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";") 8) Link to comment Share on other sites More sharing options...
cdkid Posted April 16, 2006 Share Posted April 16, 2006 (edited) I'm guessing that you're using my MySQL functions from that line of code. F.Y.I. it will not work for SQL, only MySQL. Also, you need beta to run that. ~cdkid Edited April 16, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! Link to comment Share on other sites More sharing options...
Bounda Posted April 16, 2006 Author Share Posted April 16, 2006 (edited) valuator i did what u said and the output was correct heres the function Func _MySQLConnect($sUsername, $sPassword, $sDatabase, $sServer, $sDriver = "{MySQL ODBC 3.51 Driver}") Local $v = StringMid($sDriver, 2, StringLen($sDriver) - 2) Local $key = "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers", $val = RegRead($key, $v) 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 & ";") If @error Then SetError(1) Return 0 Else Return $ObjConn EndIf EndFunc ;==>_MySQLConnect i get the error at ObjConn.Open --------------------------^ERROR Edited April 16, 2006 by Bounda CS:S Aimbot - List From INI Funcs Link to comment Share on other sites More sharing options...
Bounda Posted April 16, 2006 Author Share Posted April 16, 2006 lol im using mysql from a website host. im using beta and also using the function from a udf CS:S Aimbot - List From INI Funcs Link to comment Share on other sites More sharing options...
cdkid Posted April 16, 2006 Share Posted April 16, 2006 (edited) See my post in my MySQL thread about error catching, somewhere on the first or second page. nevermind, found it. $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 put that at the top of your script Also, check your credentials/webhost spelling. mywebsite should be mywebsite.com, passwords & usernames are case sensetive, etc Edited April 16, 2006 by cdkid AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide! 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