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_MUS Reference/Configuration Procedure

ADOxtra for Macromedia Shockwave Multiuser Server

Using ADOxtra_MUS with MUS

The MUS xtras are loaded by commands in the server or movie configuration file. The server configuration file is named "Multiuser.cfg"; the default movie configuration file is named "Movie.cfg". Xtras loaded by the server configuration file are called "server level xtras", while xtras loaded by a movie configuration file are called "movie level xtras".

In the config file, use the following config file command to load ADOxtra_MUS:
ServerExtensionXtras = SomeOtherXtras ADOxtra

Once the xtra loaded by MUS it is configured by special configuration commands in the config file.

Note: Server level xtra is configured only once while MUS is loading. Movie level xtra is configured every time the movie is created and destroyed when the last user leaves the movie.

ADOxtra_MUS' Configuration Procedure

The configuration procedure starts with:
XtraConfigCommands for ADOxtra
followed by multiple configuration statements in a form:
XtraCommand = "Name: Value"
Note: MUS does not allow placing a quote inside xtra's command value. Use _QUOTE_ if you need the quote inside a Value part of the configuration command. For example:
XtraCommand = "ADO.SQL: SELECT * FROM Something WHERE SomeField = '_QUOTE_Some Text_QUOTE_ ' "

Every configuration statement is parsed by ADOxtra_MUS. The xtra detects the Name and Value parts of the setting. Then the xtra checks whether Name is appropriate to the current context. After that it tries to set the specified value.

The usual configuration procedure is expected to be in a certain order:
XtraConfigCommands for ADOxtra
#Xtra-level settings
...
XtraCommand = "DataSource: SomeDataSourceName"
#Settings for this data source
...
#Queries for this data source:
XtraCommand = "Query: SomeQueryName"
#Settings for this query
...
XtraCommand = "Query: SomeOtherQueryName"
#Settings for this query
...
XtraCommand = "DataSource: SomeOtherDataSourceName"
#Settings for this data source
...
#Queries for this data source:
...

ADOxtra_MUS will notify you if some configuration command is not placed in proper context by outputting a warning message in the MUS log.

Typical configuration for ADOxtra_MUS

Note: # at the begining of the line makes MUS to ignore that line.

XtraConfigCommands for ADOxtra

XtraCommand = "QueryParamStart: <%"
XtraCommand = "QueryParamEnd: %>"

# Here we create a DataSource with name: TestDB
XtraCommand = "DataSource: TestDB"

#Allow it to be used from client
XtraCommand = "AccessMode: Normal"
# XtraCommand = "AccessMode: Limit to server-side"

#ADO Connection string for the data source
XtraCommand = "ADO.ConnectionString: Provider=Microsoft.Jet.OLEDB.4.0; Data Source=E:\Databases\Project Database\Data\ProjectDB.mdb"

#Open it right now
XtraCommand = "ADO.Open"

#Here we create a Query object with name TestQuery
XtraCommand = "Query: TestQuery"

#Make it available to MUS client movies
XtraCommand = "AccessMode: Normal"
# XtraCommand = "AccessMode: Limit to server-side"

#We do not usually want clients to be able to overwrite the SQL of this object
XtraCommand = "UseSQL: Predefined"
#XtraCommand = "UseSQL: Any"

#Define SQL query with formal parameter ParentId
XtraCommand = "ADO.SQL: SELECT * FROM SomeTable WHERE ParentId=<%ParentId%>"

#Use static cursor for the recordset
XtraCommand = "ADO.CursorType: adOpenStatic"
# XtraCommand = "ADO.CursorType: adOpenDynamic"
# XtraCommand = "ADO.CursorType: adOpenForwardOnly"
# XtraCommand = "ADO.CursorType: adOpenKeyset"

#Use ADO client cursor
XtraCommand = "ADO.CursorLocation: adUseClient"
# XtraCommand = "ADO.CursorLocation: adUseServer"

#Put a read only lock
XtraCommand = "ADO.LockType: adLockReadOnly"
# XtraCommand = "ADO.LockType: adLockPessimistic"
# XtraCommand = "ADO.LockType: adLockOptimistic"
# XtraCommand = "ADO.LockType: adLockBatchOptimistic"

#Set ADO cache size for the recordset
XtraCommand = "ADO.CacheSize: 10"

#We could open recordset here but there is no need to do it now
# XtraCommand = "ADO.Open"

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