Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

ADO: Start a section in the Wiki

$
0
0
ADO (ActiveX Data Objects) is a set of Component Object Model (COM) objects for accessing data sources like text files, Excel workbooks, databases (e.g. MS SQL, Oracle, MySQL), directory services (e.g. Active Directory, OpenLDAP).
There are many examples on the forum but a documentation that puts it all together is missing.

If you would like to see such a section in the Wiki then please answer the question in the poll and post the data source you would like to  see documented (text file, MS SQL, Excel ...)

(Stripped down) Example by GreenCan:
[ autoit ]         
$sPath_to_database = "C:\Temp\text delimited files" $connection = "DRIVER={Microsoft Text Driver (*.txt; *.csv)};Dbq=" & $sPath_to_database & ";Extensions=asc,csv,tab,txt;" $adoCon = ObjCreate("ADODB.Connection") $adoCon.Open($connection) If @error Then Exit MsgBox(48, "Error", "error " & @error) $adoRs = ObjCreate("ADODB.Recordset") $adoSQL = "SELECT * FROM Countries.csv" $adoRs.CursorType = 2 $adoRs.LockType = 3 $adoRs.Open($adoSQL, $adoCon) With $adoRs If .RecordCount Then      While Not .EOF          $sResult = $sResult & "" & .Fields("Continent").Value & "|" & .Fields("alpha_2").Value & "|" & .Fields("English_Country_Name").Value & @CR          .MoveNext      WEnd EndIf EndWith $adoCon.Close MsgBox(0, "Result", $sResult)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>