diikee Posted July 15, 2008 Share Posted July 15, 2008 $db = ObjCreate("ADODB.Connection") $db.Open("DSN=testing") $dbdata = $db.Execute("SELECT * FROM testing")dsn= testing --->>which contains the username, pswd, dbI get this errorC:\autoit\vmc.au3 (43) : ==> The requested action with this object has failed.:$db.Open("DSN=testing")$db.Open("DSN=testing")^ ERRORRead through the search forums but no SQL server related material Link to comment Share on other sites More sharing options...
Zedna Posted July 15, 2008 Share Posted July 15, 2008 Look here:http://www.autoitscript.com/forum/index.ph...st&p=383178http://www.autoitscript.com/forum/index.ph...st&p=462855 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ChrisL Posted July 15, 2008 Share Posted July 15, 2008 or here http://www.autoitscript.com/forum/index.php?showtopic=51952 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
diikee Posted July 15, 2008 Author Share Posted July 15, 2008 (edited) $con = _SQLStartup() If @error then Msgbox(0,"Error","Error starting ADODB.Connection") _SQLConnect(-1,"localhost","testing","d","dm") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1, "CREATE TABLE tstlog (Date_Time_Unit VARCHAR(20) UNIQUE,Test_Type VARCHAR(20),Status VARCHAR(10));") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1,"INSERT INTO tstlog (Date_Time_Unit,Test_Type,Status) VALUES ('"& @YEAR & "','"& @MON & "','"& @MDAY & "');") if @Error then Msgbox(0,"",$SQLErr) Connection and writing to the database works fine but i keep getting this errors.... --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) Edited July 15, 2008 by diikee Link to comment Share on other sites More sharing options...
ResNullius Posted July 16, 2008 Share Posted July 16, 2008 $con = _SQLStartup() If @error then Msgbox(0,"Error","Error starting ADODB.Connection") _SQLConnect(-1,"localhost","testing","d","dm") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1, "CREATE TABLE tstlog (Date_Time_Unit VARCHAR(20) UNIQUE,Test_Type VARCHAR(20),Status VARCHAR(10));") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1,"INSERT INTO tstlog (Date_Time_Unit,Test_Type,Status) VALUES ('"& @YEAR & "','"& @MON & "','"& @MDAY & "');") if @Error then Msgbox(0,"",$SQLErr) Connection and writing to the database works fine but i keep getting this errors.... --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) Those errors have nothing to do with the code you posted. They are errors from the IE include: you must calling some IE functions elsewhere in your script. Show us that code... Link to comment Share on other sites More sharing options...
ChrisL Posted July 16, 2008 Share Posted July 16, 2008 $con = _SQLStartup() If @error then Msgbox(0,"Error","Error starting ADODB.Connection") _SQLConnect(-1,"localhost","testing","d","dm") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1, "CREATE TABLE tstlog (Date_Time_Unit VARCHAR(20) UNIQUE,Test_Type VARCHAR(20),Status VARCHAR(10));") if @Error then Msgbox(0,"",$SQLErr) _SQLExecute(-1,"INSERT INTO tstlog (Date_Time_Unit,Test_Type,Status) VALUES ('"& @YEAR & "','"& @MON & "','"& @MDAY & "');") if @Error then Msgbox(0,"",$SQLErr) Connection and writing to the database works fine but i keep getting this errors.... --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function _IELoadWait, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) --> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler) If your using my UDF for SQL then it has a Autoit.Error object registered so if you try to use ie as well it moans at you about not being able to register the ie error handler. However because I have already registered one in my UDF the ie errors wont make your script bomb out anyway [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
diikee Posted July 16, 2008 Author Share Posted July 16, 2008 ChrisL, Yes, your explanation is correct since my script still executes fine. If I run your script without _ie function call, everything is sweet and clean. Any work been done to clean those errors in the future?? Link to comment Share on other sites More sharing options...
ChrisL Posted July 17, 2008 Share Posted July 17, 2008 ChrisL,Yes, your explanation is correct since my script still executes fine. If I run your script without _ie function call, everything is sweet and clean.Any work been done to clean those errors in the future??If you want to then lookin my UDF and comment out the line where I set the AutoIt.Error handler "Global $objErr = ObjEvent("AutoIt.Error","MyErrFunc")" and then call the IE one instead, you wont be able to check my $SQLErr for information on incorrect syntax or other errors though [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted July 17, 2008 Share Posted July 17, 2008 ChrisL,Yes, your explanation is correct since my script still executes fine. If I run your script without _ie function call, everything is sweet and clean.Any work been done to clean those errors in the future??New version of the script has been uploaded hereThe error handler is now optional and the _SQLGetData2D() function has been improved [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
diikee Posted July 17, 2008 Author Share Posted July 17, 2008 Tried it and got the following errorC:\Program Files\AutoIt3\Include\_sql.au3 (65) : ==> The requested action with this object has failed.:$ret = $ConHandle.Execute ( $query )$ret = $ConHandle.Execute ( $query )^ ERROR Link to comment Share on other sites More sharing options...
ChrisL Posted July 18, 2008 Share Posted July 18, 2008 Tried it and got the following errorC:\Program Files\AutoIt3\Include\_sql.au3 (65) : ==> The requested action with this object has failed.:$ret = $ConHandle.Execute ( $query )$ret = $ConHandle.Execute ( $query )^ ERRORYour not using any error handler and have passed some incorrect data and it crashed, so either use my error handler or the ie one [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire 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