ADO.au3 UDF 2.1.14 BETA

   (0 reviews)

1 Screenshot

About This File

I want to present BETA Version of my ADO.au3 UDF.

Support topic is here: http://www.autoitscript.com/forum/index.php?showtopic=180850

 

This UDF is modifed version of _sql.au3 UDF.

For that I want to thanks : ; Chris Lambert, eltorro, Elias Assad Neto, CarlH

 

 


What's New in Version 2.1.14 BETA

Released

2017/03/20 '2.1.14 BETA'
.   Changed: Function: _ADO_COMErrorHandler - If @Compiled Then Return ....... - mLipok
.   Examples: Fixed bug in example for XLS - mLipok
.       thanks to ViciousXUSMC
.       https://www.autoitscript.com/forum/topic/180850-adoau3-udf-beta-support-topic/?do=findComment&comment=1307690
.   Examples: New Function: _ErrFunc($oError) - mLipok
.       ; HowTo: use your own COMErrorHandler instead internal ADO.au3 UDF COMError Handler - _ADO_COMErrorHandler
.   Examples: New Function: _ErrDescription($sDescription = Default) - mLipok
.       ; store description to use it outsided UDF in your own function
.   Added: #Au3Stripper_Ignore_Funcs=__ADO_EVENT__*  - mLipok
.   Changed: _ADO_Execute automaticaly check __ADO_Recordset_IsNotEmpty($oRecordset) - mLipok
.   Changed: Function: _ADO_ConnectionString_Access() - added support for '.accdb' when $sDriver = Default - mLipok
.   Chnaged: $aRocordset >> $aRecordset - Skysnake
.
.
.   !!! REMARK - I'm not sure when this following changes was happend
.   Removed: Function: _ADO_OpenSchema_Views - MS SQL: Object or provider could not perform requested action - mLipok
.       REF: https://msdn.microsoft.com/en-US/library/ee275169(v=bts.10).aspx
.           For all DBMS only this four QueryType are common:
.               adSchemaColumns, adSchemaIndexes, adSchemaTables, adSchemaProviderTypes
.           The SchemaEnum values supported by the Microsoft® OLE DB Provider for DB2 and the Microsoft® ODBC Driver for DB2 can be one of the following constants:
.               adSchemaColumns, adSchemaIndexes, adSchemaTables, adSchemaProviderTypes + adSchemaProcedures + adSchemaProcedureParameters + adSchemaPrimaryKeys
.   Removed: Function: _ADO_Schema_GetAllViews - as _ADO_OpenSchema_Views() is also removed - mLipok
.   Changed: Function: __ADO_IsValidObjectType - in case of @error occured, @extended always return $ADO_EXT_INTERNALFUNCTION - mLipok
.   Changed: Function: _ADO_COMErrorHandler() - parameter $oADO_Error is now passed as ByRef - mLipok
.   Added: Function INDEX - Skysnake

2016/03/18 '2.1.13 BETA'
.   Changed: _ADO_COMErrorHandler - now showing also _ADO_UDFVersion()  - mLipok
.   New: Enums: $ADO_ERR_ISNOTREADYOBJECT - mLipok
.   Renamed: Function: __ADO_Connection_IsOpen >> __ADO_Connection_IsReady - mLipok
.   Changed: Function: __ADO_Connection_IsReady : new feature checking connection state and seting  $ADO_ERR_ISNOTREADYOBJECT - mLipok
.   New: Function: __ADO_Recordset_IsReady - mLipok
.           __ADO_Recordset_IsReady is a wrapper for __ADO_Recordset_IsValid
.               which also check for $oRecordset.state and set $ADO_ERR_ISNOTREADYOBJECT
.           __ADO_Recordset_IsReady is now used in few functions which uses $oRecordset
.   Changed: Function: __ADO_Recordset_IsNotEmpty : now using __ADO_Recordset_IsReady instead __ADO_Recordset_IsValid - mLipok
.           as __ADO_Recordset_IsReady is wrapper for __ADO_Recordset_IsValid
.           so now __ADO_Recordset_IsNotEmpty checking old and new feature
.
.   !!!!!!!!!!!!!!!!!!!!!!!!
.   Renamed: _ADO_ERROR_Description >> _ADO_MSDNErrorValueEnum_Description
.   New: Function: _ADO_GetErrorDescription - mLipok
.   New: Function: _ADO_ConsoleError - mLipok

2016/03/09 '2.1.12 BETA'
.   New: Enums: $ADO_ERR_ISCLOSEDOBJECT - mLipok
.   New: Function: __ADO_Connection_IsOpen - mLipok
.           __ADO_Connection_IsOpen is a wrapper for __ADO_Connection_IsValid  which also check for $oConnection.state and set $ADO_ERR_ISCLOSEDOBJECT
.           __ADO_Connection_IsOpen is now used in few functions which uses $oConnection
.   Changed: Function: __ADO_Recordset_IsNotEmpty - checking $oRecordset.state and return $ADO_ERR_ISCLOSEDOBJECT - mLipok
.   Changed: Function: _ADO_Command_Execute - mlipok
.           Now return recordset
.   Changed: ADO_EXAMPLE.au3 - _Example_MSSQL_COMMAND_StoredProcedure() - mLipok
.   Removed: Function: _ADO_Connection_OpenJet - mLipok
.           Look for: _ADO_Connection_OpenConString or _ADO_ConnectionString_Excel

2016/03/08 '2.1.11 BETA'
.   New: Function: _ADO_OpenSchema_Catalogs - mLipok
.   New: Function: _ADO_OpenSchema_Tables - mLipok
.   New: Function: _ADO_OpenSchema_Columns - mLipok
.   New: Function: _ADO_OpenSchema_Indexes - mLipok
.   New: Function: _ADO_OpenSchema_Views - mLipok
.   New: Function: _ADO_Schema_GetAllCatalogs - mLipok
.   New: Function: _ADO_Schema_GetAllTables - mLipok
.   New: Function: _ADO_Schema_GetAllViews - mLipok
.   Removed: Function: _SQL_GetTableName - mLipok
.   Removed: Function: _ADO_Connection_OpenExcel - mLipok
.       Look for: _ADO_Connection_OpenConString and _ADO_ConnectionString_Excel
.   Changed: ADO_EXAMPLE.au3 - _Example_MySQL() - mLipok
.   Changed: ADO_EXAMPLE.au3 - _Example_PostgreSQL() - mLipok
.   Renamed: Function: _ADO_Command >> _ADO_Command_Create - mLipok
.   Changed: Function: _ADO_Command_Create: Parameters removed - $sQuery - mLipok
.   New: Function: _ADO_Command_CreateParameter - mlipok
.   New: Function: _ADO_Command_Execute - mlipok    .
.   Added: ADO_EXAMPLE.au3 - _Example_MSSQL_COMMAND_StoredProcedure() - mLipok

 

 


1 person likes this



User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Similar Content

    • Gorby7
      By Gorby7
      I have an Autoit-based client GUI that uses a single MS SQL Server database. I have no problem connecting to and executing queries against this database from my AutoIT code, with the below exception:
      One of the database's stored procedures I need to execute requires a parameter that is a table. I've set up the appropriate table_type on the database and everything works fine on the database itself when I execute the stored proc with a table variable for the parameter (no AutoIT involved). The problem is that I can't figure out how to pass a table parameter from AutoIT, assuming it's even possible. The code below shows the two methods I've tried, both methods return a RecordSet object that is at EOF.
      #include <Array.au3> Opt("MustDeclareVars", 0) $sDBSrv = "ITSQL01.domain.com" $sDBName = "INVDEV" $sADOName = "ADODB.Connection" $oSQLConn = ObjCreate($sADOName) $sConnStr = "Driver={SQL Server};Server=" & $sDBSrv & ";Database=" & $sDBName & ";Trusted_Connection=yes;" $oSQLConn.Open ($sConnStr) $rsoFacFriendly = $oSQLConn.Execute("SELECT TOP 5 FriendlyName FROM Facility") If Not $rsoFacFriendly.EOF Then $aFacFriendly = $rsoFacFriendly.GetRows() _ArrayDisplay($aFacFriendly) $rsoSPResults = $oSQLConn.Execute("EXEC spTableParameterPassTest " & $aFacFriendly) Select Case $rsoSPResults.EOF = False MsgBox(0, "sp exec1", "not end of file") $aSPResults = $rsoSPResults.GetRows() _ArrayDisplay($aSPResults) Case IsObj($rsoSPResults) = 0 MsgBox(0, "sp exec1", "rso isn't even an object") Case $rsoSPResults.EOF = True MsgBox(0, "sp exec1", "At end of file") Case Else MsgBox(0, "sp exec1", "Something else happened") EndSelect $rsoSPResults = 0 $rsoSPResults = $oSQLConn.Execute("EXEC spTableParameterPassTest " & $rsoFacFriendly) Select Case $rsoSPResults.EOF = False MsgBox(0, "sp exec2", "not end of file") $aSPResults = $rsoSPResults.GetRows() _ArrayDisplay($aSPResults) Case IsObj($rsoSPResults) = 0 MsgBox(0, "sp exec2", "rso isn't even an object") Case $rsoSPResults.EOF = True MsgBox(0, "sp exec2", "At end of file") Case Else MsgBox(0, "sp exec2", "Something else happened") EndSelect $rsoSPResults = 0 $rsoFacFriendly = 0 $oSQLConn.Close $oSQLConn = 0 Exit  
    • rynow
      By rynow
      romaSQL
      This autoIt UDF is built on the concept of Laravel Query & doctrine.
      RomaSQL provides a new, comfortable and easy to use way for SQL-queries in autoIt.
      Most of the common SQL-queries are supported already and more are coming soon.
      All of your support is much appreciated.
      Connections
      For the connection the object ADODB is used. Therefore the connection string is based on ODBC.
      You can also use OLEDB connection strings or other database connections.
      In order for this to work your add-ons have to be installed in the function: __4ern_SQL_Connection.
      I’d be very glad if you shared your modifications with me.
      Currently supported connections
      -       MySQL (odbc)
      -       Microsoft SQL Server (odbc)
      -       SQLite (odbc)
      -       Microsoft Access (odbc)
      Command reference
      $SQL_connect; establishing connection $SQL_returnType; return a Array or Dictionary ('oDict') Object (Default = Array) $SQL_setDefaultTable; Default Tablename $SQL_setDefaultKey; Default Colmn Key (Default = id) $SQL_debug; if True, show SQL Statment in Console $SQL_get $SQL_update $SQL_delete $SQL_insertInto $SQL_take $SQL_limit $SQL_table $SQL_select $SQL_distinct $SQL_where $SQL_orWhere $SQL_whereBetween $SQL_whereNotBetween $SQL_whereIn $SQL_whereNotIn $SQL_whereNull $SQL_whereNotNull $SQL_having $SQL_orHaving $SQL_havingBetween $SQL_havingNotBetween $SQL_havingIn $SQL_havingNotIn $SQL_havingNull $SQL_havingNotNull $SQL_groupBy $SQL_orderBy  
      Examples
      establishing connection
      ;-----/ ; SQLite Connection ;-----/ $SQL_setDatabase('sqlite') $SQL_connect('C:\project.db') ;-----/ ; Access Connection ; Database, User, Password ;-----/ $SQL_setDatabase('access') $SQL_connect('C:\project.mdb') ;or as Admin $SQL_connect('C:\project.mdb', '4ern', 'root') ;-----/ ; SQLServer Connection ; Database, User, Password, Server, Driver ;-----/ $SQL_setDatabase('sqlserver') $SQL_connect('myDB', '4ern', 'root', 'localhost') ;or with Driver $SQL_connect('myDB', '4ern', 'root', 'localhost', 'SQL Server') ;-----/ ; MySQL Connection ; Database, User, Password, Server, Driver ;-----/ $SQL_setDatabase('mysql') $SQL_connect('myDB', '4ern', 'root', 'localhost') ;or with Driver $SQL_connect('myDB', '4ern', 'root', 'localhost', 'MySQL ODBC 5.2 UNICODE Driver')  
      simple SQL query
      $SQL_table('albums') $aRet = $SQL_get() if IsArray($aRet ) then _ArrayDisplay($aRet ) else ConsoleWrite('Keine Ergebnisse' & @LF) endif  
      Select
      $SQL_table('albums') $SQL_select('id', 'Name', 'Artist', 'Song') ;or pass to an Array Local $aSelect = ['id', 'Name', 'Artist', 'Song'] $SQL_select($aSelect) $aRet = $SQL_get() if IsArray($aRet ) then _ArrayDisplay($aRet ) else ConsoleWrite('Keine Ergebnisse' & @LF) endif where
      $SQL_table('albums') $SQL_select('id', 'Name', 'Artist', 'Song', 'Votes') $SQL_where('Artist', 'adele') $SQL_where('Votes', '>=' ,'9') $SQL_orWhere('Artist', '=' ,'Rag'n'Bone Man') ;or pass to an 2dArray Local $aSelect = [['Artist','adele'],['Votes', '>=' ,'9']] $SQL_where($aSelect) $aRet = $SQL_get() if IsArray($aRet ) then _ArrayDisplay($aRet ) else ConsoleWrite('Keine Ergebnisse' & @LF) endif  
      If you need more examples, then tell me exactly what you need.
      I hope you like my UDF and find some use for it.
      ---
      ->DONWLOAD romaSQL
       
       
    • Valnurat
      By Valnurat
      I hope my title is good enough.
      I'm using the ADO UDF and I have question regarding editing SQL records with this UDF.
      The owner of the UDF suggested an idea, but maybe there is another trix.
    • Paranthaman
      By Paranthaman
      Hi,
      I want to click a link by the element ID through IEGetObjById.
      <!DOCTYPE html> <html> <body> <button type="button" id="Random-1-ID" onclick="alert('Hello world!')"></button> </body> </html> I intend to click the button with ID"Random-1-ID". But on every refresh the ID changes to next number like "Random-2-ID" "Random-3-ID"
       
      The code i which i wrote for this function is
      #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("I:\Documents\1. Work\Automation\My codes\Collections\11. Clicking button by Value and ID\button.html") Local $oDiv = _IEGetObjById($oIE, "Random-1-ID") _IEAction($oDiv, "click") _IELoadWait($oIE) So can anyone help me to alter this code like it clicks for every ID in format "Random-%-ID"