Frequently Asked Questions

COM Array Support -- Handling ADO Errors

Question:

Does mProjector support COM arrays? How do I check for ADO errors?

Answer:

Both COM object methods and simple properties can be accessed through ActionScript. Properties, such as the EOF property of the ADO Recordset object can be accessed directly. However, ADO array properties have to be accessed via the getProperty function, and set via the setProperty function.

An example of this can be seen in handling ADO errors. Instead of accessing error members via connection.Errors[i] you need to use connection.getProperty("Errors",i).

For example, replace the following code:

for (i in connection.Errors)
{
	mApplication.trace("Connection Errors:: " + i.Description);
}
with:
for (i=0; i < connection.Errors.Count; i++)
{
	var Description = connection.getProperty("Errors",i).Description;
	mApplication.trace("Connection Errors:: " + Description);
}

 

 

If you have additional questions or have ideas on how to improve an FAQ, contact us. Please include a link to the FAQ in your email.