A list of products available on this site
Documentation for XtraMania's xtras
Prices and links to the online store
Xtras, PDFs, samples
Have a question? Ask us!
Contacts
Logo. www.xtramaina.com  
Home Search E-mail
ADOxtra Reference/Technical Details

ADOxtra for Macromedia Director

Supported subset of ADO

ADO has rather large version history, since it is growing. ADO is COM-based, therefore it keeps backward compatibility while growing (in the most of cases). ADOxtra implements only the most common subset of ADO interfaces (defined since ADO version 2.0). Supporting interface version 2.0 allows ADOxtra to be used with almost all current Windows systems with ADO preinstalled. All later ADO releases fully support interfaces of version 2.0. Furthermore, it is usually recommended to use later version of ADO, since Microsoft fixes some ADO bugs.
ADOxtra supports only four types of ADO objects: ADODB.Connection, ADODB.Recordset, ADODB.Field, ADODB.Property. Also it has a limited support for. These objects are usually enough for the most Director databasing applications. If you have to use functionality of later ADO versions or ADO extension components (ADOX) to use saved recordset, database management and other features, take a look at VbScriptXtra, which allows using ADO, ADOX, DAO via universal Automation technology right from Lingo. VbScriptXtra syntax differs slightly from ADOxtra syntax, but ADO is ADO, which is well documented at msdn.microsoft.com.

Default object's property

ADOxtra supports default object's property where appropriate. Usually default object's property is Value. For example, following lines make the same:
val=rst.fields["FieldName"]
val=rst.fields["FieldName"].Value

Visual Basic uses different assignment operators for assigning reference to the object and assigning value of other data type. Different assignment operators allow VB interpreter to distinguish between using object reference and using the default property of that object. Lingo does not allow differentiating these two cases, therefore ADOxtra always uses default property in such cases (where Lingo allows). If you need to save object reference in a variable, use ref common property of ADOxtra wrapper object, as in a sample below:
fld=rst.fileds["FieldName"].ref
put fld.value

Default object's method (or indexed property)

Default object's method (indexed property) is not supported by ADOxtra, since Lingo syntax differences. In Visual Basic you can use:
type=rst("FieldName").Type
This sample will not work with ADOxtra. Instead use:
type=rst.fields["FieldName"].Type

Note square brackets [ ], which are used by ADOxtra instead of usual brackets ( ) in VB.

Events

The current version of ADOxtra does not support automation events.

Named method's arguments

Named arguments are not supported by ADOxtra since they are not supported by Lingo. In Visual Basic you may use following syntax:
obj.Method paramName:=actualValue
ADOxtra does not provide this feature.

Optional and missing method's arguments

Optional and missing arguments are supported by ADOxtra but Lingo requires you to use VOID value to indicate missing argument in the middle of the parameters list. Missing arguments in the end of the arguments list may be safely skipped. Default values will be used by ADO object.

Passing parameters by reference

The current version of ADOxtra does not support parameters passed by reference, since Lingo does not support it for simple data types. There is a one case where this problem takes place with ADOxtra. It is an Execute method of a Connection object:
cnn.Execute CommandText, Records Affected, Options

In VB RecordsAffected gets the number of records affected by the executed operation. ADOxtra does not currently provide this feature. If you need it see VbScriptXtra, which allows using ADO, ADOX, DAO via universal Automation technology right from Lingo.

Arrays as arguments an returned values

The current version of ADOxtra does not support arrays.
Several ADO methods may accept optional arrays or return arrays. See VbScriptXtra, which allows using ADO, ADOX, and DAO via universal Automation technology, right from Lingo.

Site homeSearchContact author © Eugene Shoustrov. www.xtramania.com