Dabbang 0 Posted July 22, 2011 Dear All; I have just come to know about Autoit3 , & when I tried to create small script so it's really working fine. Now I want to move ahead & Like to know "How to Connect database which is having (Server name,Host name,Id, Pwd) using Autoit3 script. I am able to connect MS access DB using it, but not sure about other DB. Please let me know if you have want more info regarding this topic. Thanks in Advance Dabbang Share this post Link to post Share on other sites
ChrisL 13 Posted July 22, 2011 Look in my signature below and download the SQL UDF, it should do what you need! [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 Share this post Link to post Share on other sites
Dabbang 0 Posted July 22, 2011 About other DB -- I am making it very clear & specific, I did connection for MS Access DB with the following code $dbname = "C:\Documents and Settings\mmmmmm\My Documents\Dabbang.mdb" $tblname = "Swap" $query = "SELECT * FROM " & $tblname & " " Local $title $adoCon = ObjCreate("ADODB.Connection") ;$adoCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & $dbname) ;Use this line if using MS Access 2003 and lower $adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $dbname) ;Use this line if using MS Access 2007 and using the .accdb file extension $adoRs = ObjCreate ("ADODB.Recordset") $adoRs.CursorType = 1 $adoRs.LockType = 3 $adoRs.Open ($query, $adoCon) $title = $adoRs.Fields("Name").value ;Retrieve value by field name $title1 = $adoRs.Fields("Company").value ;$title = $adoRs.Fields(2).value ;Retrieve value by column number $adoCon.Close MsgBox(0,"testing",$title) ;Sleep(10) MsgBox(0,"testing",$title1) Now I want to do SQL DB connection , when I search for the code I get confused. Please let me know "How can I make the SQL Database connectivity using Auto it3" Thanks Dabbang Share this post Link to post Share on other sites
ChrisL 13 Posted July 22, 2011 Now I want to do SQL DB connection , when I search for the code I get confused. Please let me know "How can I make the SQL Database connectivity using Auto it3"ThanksDabbangDid you actually look at the link in my signature, it has SQL connection and Access and more and the first post shows you some example usage. [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 Share this post Link to post Share on other sites