Sign in to follow this  
Followers 0
Dabbang

Database Connectivity in Auto IT3

4 posts in this topic

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



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

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

Did 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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0