Bounda Posted April 16, 2006 Share Posted April 16, 2006 (edited) 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 Edited April 16, 2006 by Bounda CS:S Aimbot - List From INI Funcs Link to comment Share on other sites More sharing options...
Fossil Rock Posted April 17, 2006 Share Posted April 17, 2006 Is the download the latest version? Agreement is not necessary - thinking for one's self is! Link to comment Share on other sites More sharing options...
cdkid Posted April 17, 2006 Author Share Posted April 17, 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 & ";")^ ERRORthe ^error is supposed to be pointing at the C on Objconn but it wouldnt work wit code or quotei was just trying teh function too x . xSee my post on page 1 about error handling. Make sure you have the correct credentials, and are running your program under beta.~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...
Balachander K Posted April 27, 2006 Share Posted April 27, 2006 (edited) Excellent Work cdkid. I am in the process of learning AutoIT and i found your UDF immediately useful..... Will definetly try to contribute in future... Keep up the good work. -Bala Edited April 27, 2006 by Balachander K Link to comment Share on other sites More sharing options...
Cyber Posted April 27, 2006 Share Posted April 27, 2006 This is FANTASTIC SCRIPT!!!!! GOOOOOD!!! Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
jvanegmond Posted April 28, 2006 Share Posted April 28, 2006 (edited) cdkid... Could you also write a SQL server in autoit that uses the same syntax? because if you could, that would really rock I'm thinking TCP, Excel... Wait, I just realised.. It's not hard... 200 lines tops Edited April 28, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
AutoItKing Posted April 29, 2006 Share Posted April 29, 2006 (edited) I like these! Edited June 13, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
kpu Posted May 8, 2006 Share Posted May 8, 2006 I just started working on this and I can't get it to work. I've installed "MyODBC-3.51.10-2-win.msi" on my PC and MySQL 5.0.19. Here's My code: #include <MySQL.au3> $mysql_srv = "10.10.81.65" $objErr = ObjEvent("AutoIt.Error","MyErrFunc") $sql = _MySQLConnect('tester','chc2006','domainquery',$mysql_srv) MsgBox(64,"",$sql) _CreateTable($sql, 'testtable3', 'tt_id') _CreateTable($sql, 'testtable', 'tt_id') _AddRecord($sql, 'MyField', 'tt_id', 1) _MySQLEnd($sql) 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 Using your error control, it returns this: Description: Catastrophic Failure err.number is 80020009 err.source is: Provider err.helpcontext is: 1240640 I've also tried using "mysql-connector-odbc-5.0.0-alpha-win32.msi" and modifying the MySQL.au3 to reflect the driver location. It doesn't error, but it won't write to the DB. Public: 3.1.1.0 Beta: 3.1.1.123 Any help would greatly be appreciated! http://www.kpunderground.com Link to comment Share on other sites More sharing options...
Marklar Posted June 9, 2006 Share Posted June 9, 2006 (edited) Nice script. Just what I needed. So far it works great except for thisGlobal $db = _MySQLConnect("root","","table","localhost")That will work just fine but if I were to change it to thisGlobal $db = _MySQLConnect("root","","table","192.168.1.176")I get this errorThe 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>AutoIT3.exe ended.The others that had this error seemed to get it fixed by using the latest beta. But I do have the latest beta. I go the one that was released just a few days ago.I have the ODBC Drivers installed. It seems to only work when set to localhost. I would like to use this on a LAN so I will need to use an IP address or the name of the PC acting as the server, which I tried that also and it didnt work. The client machine I used also has the ODBC Drivers installed. And just to be sure it wasn't something wrong with the client machine I tried it on the server as well and got the same error.Any ideas? Edited June 9, 2006 by Marklar Link to comment Share on other sites More sharing options...
cdkid Posted June 13, 2006 Author Share Posted June 13, 2006 See the error handler on page 2 or 3 (can't remember which). It should tell you the problem. ~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...
=sinister= Posted June 19, 2006 Share Posted June 19, 2006 Wheres the TableExists UDF in the au3 file? Link to comment Share on other sites More sharing options...
cdkid Posted June 21, 2006 Author Share Posted June 21, 2006 I'll check. I've been away so I haven't had time to check... Right now it's late so I'll update tommorow mornin. 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...
TelcoTech Posted June 22, 2006 Share Posted June 22, 2006 This is great. I been looking for somethig like this for a while. I'm trying "include" this UDF in one of my scripts, but I keep getting this message: C:\Documents and Settings\........\Dev\v.0.1\MySQL.au3 (328) : ==> Unable to parse line.: While Not .EOF While Not .E^ ERROR I've installed the ODBC drivers as outlined on your post, but still having problems. I've been using AutoIT for small projects, but nothing this in depth before. Please help. Thanks..... Link to comment Share on other sites More sharing options...
ivan Posted June 23, 2006 Share Posted June 23, 2006 Great!!!! I can only echo what others feel about this UDF. At this rate Autoit is really gonna take off where no language has ever gone before... Obviously I'm a bit of a Trekkie, but not of the pathetic kind IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
theguy0000 Posted June 25, 2006 Share Posted June 25, 2006 I am running a server from my computer, and I have mySQL5 installed on my computer. will installing that ODBC thing mess up my sql? do i even need to install it? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
erebus Posted July 19, 2006 Share Posted July 19, 2006 (edited) Hello all, I have written a program that uses your excellent UDF a few months ago. Today I needed to update something and when I tried to run or compiled it, AU3 came up with this error: Only Object-type variables allowed in an "With" statement.: With $query With ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.423 I then remembered that I hadn't installed the MySQL ODBC driver on this computer. However, some time ago you have given me a trick to handle the COM errors: $objErr = ObjEvent("AutoIt.Error","ErrorHandler"); COM error handler Func ErrorHandler() $hexnum = Hex($objErr.number, 8) MsgBox(0, "title", $objErr.description & @CRLF & $objErr.windescription) Exit EndFunc ...which with previous AU3 versions worked as a charm. Now it didn't. Can you think of a reason? Of course after installing the MySQL ODBC drivers, my code (except of the COM error handler...) worked normally, so the $query is not wrong. I'm using latest stable and latest beta (130). Edited July 19, 2006 by erebus Link to comment Share on other sites More sharing options...
erebus Posted July 19, 2006 Share Posted July 19, 2006 I am running a server from my computer, and I have mySQL5 installed on my computer. will installing that ODBC thing mess up my sql? do i even need to install it?Install the ODBC 3.51 and you will have no problem at all. The driver is irrelevant to your MySQL installation on the same machine. Link to comment Share on other sites More sharing options...
Uncle Argyle Posted August 27, 2006 Share Posted August 27, 2006 I have a test script where I am querying a table for username and displaying the results. If I query on a username that doesn't exist I want to be able to handle this...however, @error is set to 0 whether the query works or fails. In my code below I display the error level as soon as the query is made so that I can troubleshoot. Am I misinterpreting the use of the @error macro? If enter a username that doesn't exist shouldn't the query fail and set @error to 1? Currently, it sets @error to a 0 either way. Using AutoIt 3.2 and the latest MySQL.au3 Thanks, Mike. expandcollapse popup#include <GUIConstants.au3> #include <String.au3> #include <MySQL.au3> ; == GUI generated with Koda == Opt("TrayIconHide", 1) Opt("GUICloseOnESC", 0) $Form1 = GUICreate("SSB Credit Worksheet Login", 270, 142, 450, 271) $Input1 = GUICtrlCreateInput("", 112, 24, 121, 24, -1, $WS_EX_CLIENTEDGE) $Input2 = GUICtrlCreateInput("", 112, 56, 121, 24, $ES_PASSWORD, $WS_EX_CLIENTEDGE) GUICtrlCreateLabel("Username:", 32, 24, 70, 24, $SS_CENTERIMAGE) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("Password:", 32, 56, 67, 24, $SS_CENTERIMAGE) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Button1 = GUICtrlCreateButton("OK", 48, 104, 75, 25, $BS_DEFPUSHBUTTON) $Button2 = GUICtrlCreateButton("Cancel", 152, 104, 75, 25) $objErr = ObjEvent("AutoIt.Error","MyErrFunc") $db = _MySQLConnect("tcadmin","s9o1u0t3","ssbcrw", "10.206.1.27") GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $user = GUICtrlRead($Input1) $var = _Query($db,"SELECT * FROM users WHERE username = '" & $user & "'") MsgBox(0,"Test - Error Level",@error) If @error Then MsgBox(0,"Test","That username is NOT found!") Else $authority = $var.Fields("fullname").value $password = $var.Fields("password").value MsgBox(0,"test","checkuser = " & $authority) MsgBox(0,"test","checkpass = " & $password) ExitLoop EndIf EndSelect WEnd _MySQLEnd($db) Exit 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 Link to comment Share on other sites More sharing options...
cdkid Posted August 28, 2006 Author Share Posted August 28, 2006 (edited) Well, i have an idea. Rather than selecting it that way, which removes any custom error handling u can use try using something like Select username from `users`; and then loop through there, checking it then if it's found Select * From `users` WHERE username = w/e; and then verify the password. --Hope this helps ~cdkid Edited August 28, 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...
Uncle Argyle Posted August 28, 2006 Share Posted August 28, 2006 I got my script working with your advice! Thanks! I should also thank you for all your work, this UDF is great! Best regards, Mike. 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