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!
Logo. www.xtramaina.com  
Home Search E-mail
ADOxtra_MUS Reference/Messages

ADOxtra for Macromedia Shockwave Multiuser Server

Messages being handled by ADOxtra_MUS

ADOxtra handles these messages:
System.ADO.GetData - is used to execute a parameterized row-returning query and retrieve a filtered resulted data.
System.ADO.Execute - Same as System.ADO.GetData.

The subject of the message has to identify both DataSource and Query objects - the target of databasing operation. Typical message subject consists of DataSource's name and Query's name separated by dot:

Client-side syntax

sendNetMessage( gConnection, "System.ADO.GetData", "DataSource.Query", [#Filter:"Id=1", #QueryParams:[#ParentId:1], #Requery:1, #SQL:"SELECT * FROM Something"], 0 )

ADOxtra_MUS sends a reply accessible via:
response = GetNetMessage( gConnection )

Server-side syntax

response= movie.sendMessage( "System.ADO.GetData", "DataSource.Query", [#Filter:"Id=1", #QueryParams:[#ParentId:1], #Requery:1, #SQL:"SELECT * FROM Something"])
where response is the message being sent by ADOxtra_MUS in reply to System.ADO.GetData message.

Response format

[..., #subject: "DataSource.Query", #content: [#DataReloaded: 1, #Data: []], ...]
[..., #subject: "DataSource.Query", #content: [#ErrorDescription: ''Error description",], ...]

Input parameters

SQL -- String value with SQL query to be executed. This value is used only by Query object configured for using Any SQL. Otherwise it is ignored.

Filter - String value that allows to filter out the needed data by using ADODB.Recordset's Filter property.

QueryParams - Property list with actual query parameters. If specified, ADOxtra_MUS will try to replace the formal query parameters with actual ones. ADOxtra_MUS does not check that all formal parameters are replaced by actual values. If ADOxtra_MUS does not find a match for particular parameter ADOxtra_MUS does not remove it from the query. In most cases these could cause improper SQL syntax or incorrect query results. So take care when using parameterized queries.

Requery - Boolean value that indicates whether to force the re-execution of the query. By default ADOxtra_MUS tries to avoid unnecessary re-execution of the query. If wrapped Recordset object is opened, ADOxtra_MUS compares its SQL source with the requested parameterized query. If they match the xtra uses existing data. Otherwise, or if Requery parameter is set to non-zero it performs either Open command or Requery command of the wrapped Recordset object.

Close - Boolean value that indicates whether to force the closing of the wrapped recordset after getting data.

Output data

DataReloaded - Boolean value indicates whether data were reloaded during processing of this message.

Data - The list of property lists, where each property list corresponds to a record of a resulted recordset with filter applied. Every property list contains a fixed set of properties as defined by SQL query.
Note: ADOxtra_MUS gets the column names of resulted rows in run-time. Then MUS converts these strings to symbols. Director symbols cannot contain dot character while ADO can produce column names with dots. Just be aware of this issue. Usually you can set a specific name for a column using SQL AS operator: SELECT SomeField AS OtherName FROM ...

ErrorDescription - String value with error description.

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