hunt Posted December 23, 2008 Share Posted December 23, 2008 (edited) Hello all! Help me please. I don't know to connect to my MySql server with AutoItScript. I looked other topics and i cant' undetstand what i do wrong.All time appears error:==> The requested action with this object has failed.:$oAdoCon.Open ($sCon)$oAdoCon.Open ($sCon)^ ERROR; Open the database and recordsetFunc _OpenDBRS(ByRef $oAdoCon, ByRef $oAdoRs, ByRef $sCon, ByRef $sQuery, ByRef $iCurType, ByRef $iLockType) $oAdoCon = ObjCreate ("ADODB.Connection") ; Create the database connection $oAdoCon.Open ($sCon) ; Open the database $oAdoRs = ObjCreate ("ADODB.Recordset") ; Create the recordset connection $oAdoRs.CursorType = $iCurType ; {See description above} $oAdoRs.LockType = $iLockType ; {See description above} $oAdoRs.Open ($sQuery, $oAdoCon) ; Open the recordsetEndFunc ; _OpenDBRS()What i must to do? Edited December 23, 2008 by hunt Link to comment Share on other sites More sharing options...
M a k a v e l ! Posted February 16, 2009 Share Posted February 16, 2009 Hello all! Help me please. I don't know to connect to my MySql server with AutoItScript. I looked other topics and i cant' undetstand what i do wrong.All time appears error:==> The requested action with this object has failed.:$oAdoCon.Open ($sCon)$oAdoCon.Open ($sCon)^ ERROR; Open the database and recordsetFunc _OpenDBRS(ByRef $oAdoCon, ByRef $oAdoRs, ByRef $sCon, ByRef $sQuery, ByRef $iCurType, ByRef $iLockType) $oAdoCon = ObjCreate ("ADODB.Connection") ; Create the database connection $oAdoCon.Open ($sCon) ; Open the database $oAdoRs = ObjCreate ("ADODB.Recordset") ; Create the recordset connection $oAdoRs.CursorType = $iCurType ; {See description above} $oAdoRs.LockType = $iLockType ; {See description above} $oAdoRs.Open ($sQuery, $oAdoCon) ; Open the recordsetEndFunc ; _OpenDBRS()What i must to do?Hi there, search the forum for MySQL, you'll get this:A MySQL UDFs, without ODBC, uses libmysql.dllhttp://www.autoitscript.com/forum/index.php?showtopic=85617Helpful ? [font="Lucida Sans Unicode"]M a k. a v e L ![/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 16, 2009 Share Posted February 16, 2009 Hello all! Help me please. I don't know to connect to my MySql server with AutoItScript. I looked other topics and i cant' undetstand what i do wrong. All time appears error: ==> The requested action with this object has failed.: $oAdoCon.Open ($sCon) $oAdoCon.Open ($sCon)^ ERROR ; Open the database and recordset Func _OpenDBRS(ByRef $oAdoCon, ByRef $oAdoRs, ByRef $sCon, ByRef $sQuery, ByRef $iCurType, ByRef $iLockType) $oAdoCon = ObjCreate ("ADODB.Connection"); Create the database connection [b]$oAdoCon.Open ($sCon); Open the database[/b] $oAdoRs = ObjCreate ("ADODB.Recordset"); Create the recordset connection $oAdoRs.CursorType = $iCurType; {See description above} $oAdoRs.LockType = $iLockType; {See description above} $oAdoRs.Open ($sQuery, $oAdoCon); Open the recordset EndFunc; _OpenDBRS() What i must to do? Show us the connection parameters passed in $sCon (obfuscate any servernames/usernames/passwords). Either the connection string is wrong or basic connectivity to the server is bad. If you add an AutoIt COM error handler (see help file), you will get more detail on the error. 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...
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