Ever wonder how to connect to from the AutoIt to a MS Access database? AutoIt, for those who don’t know, is a program to automate keystrokes and mouse movements. This is in reference to a blog post regarding a problem I had for connecting to Access from AutoIt. There are two different file types in MS Access 2007. Access 2003, 2000 and older version will most use a .mdb file type; whereas, Access 2007 can use .accdb file extension/type. I’ll show some basic code that will work with both versions. For this example, I will only retrieve one record and one field.
First let’s first create some variables that will hold the database file name (whether .mdb or .accdb), the table name and the query to execute:
$dbname = “C:UsersvkDocumentsdbMarketingarticleSubmissionsTutorialRef.mdb”
$tblname = “articles”
$query = “SELECT * FROM ” & $tblname & ” WHERE articleID = 4″
The & is simply a concatenation of the strings.
Let’s set the variable for the one field that we want to retrieve from the database.
Local $title
Pretty straightforward so far, isn’t it?
Then create the connection to the ADODB:
$adoCon = ObjCreate(“ADODB.Connection”)
Then set the Provider. There is a different Provider for each file extension. A .mdb file will have its own Provider and a .accdb file will have another.
Here is the Provider for a .mdb file:
$adoCon.Open(“Driver={Microsoft Access Driver (*.mdb)}; DBQ=” & $dbname)
Here is the Provider for .accdb file:
$adoCon.Open (“Provider=Microsoft.Jet.OLEDB.4.0; Data Source=” & $dbname)
Now let’s create the object Recordset, set some required options and then execute the query:
AutoIt:Connect to Access Databases:mdb & accdb files
24-08-2010 by adminPrevent Plagiarism with Plagiarism Check
19-07-2010 by adminNow, plagiarism spread out everywhere, especially in internet. In the internet, you will find many copyright infringements. Many articles in the web site are not the original web site. It is copied from the other web sites. It is so bad. This is including in the internet cheating. The plagiarism will affect to all of the people. Plagiarist will never make the unique content in their web site. They will always copy the article and paste it in their web site. Plagiarism check software is needed to protect the content from plagiarism. How to protect your content from plagiarism?
Now, there is software to help you to prevent the plagiarism. This is the service plagiarism free. This great software will detect the plagiarism in your web site. When the plagiarist copies your content, you will get the reports of plagiarism. This software is very helpful for companies so that they can protect their content from plagiarism. Blog about plagiarism is provided to you. This software is so great and it will always be developed to result the greatest software to detect the plagiarism. Therefore, copyright infringement can be reduced as maximal as possible by using this plagiarism check software. Are you interested to use this software?