Packagecom.ericfeminella.sql
Classpublic class PreparedStatement
InheritancePreparedStatement Inheritance flash.data.SQLStatement

PreparedStatement provides a SQLStatement implementation which enforces the text property of a statement to be sealed, that is it can only be assigned during creation of the statement.

Before a SQLStatement is executed, the runtime prepares (compiles) the statement in order to determine the steps which are to be performed internally to carry out the statement.

When a call to SQLStatement.execute is made on a SQLStatement instance which has not previously been executed, the statement is automatically prepared before it is executed. On subsequent calls to the execute method, as long as the SQLStatement.text property has not changed the statement is still prepared thus allowing the statement to execute faster.

By enforcing the SQLStatement.text property is only assigned a value once, a PreparedStatement statement can be utilized to improve performance of the statements execution.

See also

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/data/SQLStatement.html


Public Properties
 PropertyDefined by
  text : String
[write-only] By overriding the implicit setter of the text property a PreparedStatement ensures that the property is only assigned a value during object construction.
PreparedStatement
Public Methods
 MethodDefined by
  
PreparedStatement(statementText:String, connection:SQLConnection = null, itemClass:Class = null)
The PreparedStatement constructor requires the statement text which is assigned to the text
PreparedStatement
Property detail
textproperty
text:String  [write-only]

By overriding the implicit setter of the text property a PreparedStatement ensures that the property is only assigned a value during object construction.

Implementation
    public function set text(value:String):void

Throws

See also

Constructor detail
PreparedStatement()constructor
public function PreparedStatement(statementText:String, connection:SQLConnection = null, itemClass:Class = null)

The PreparedStatement constructor requires the statement text which is assigned to the text

Parameters
statementText:String — statement which is to be executed by this PreparedStatement
 
connection:SQLConnection (default = null) — which the statement is to execute against
 
itemClass:Class (default = null) — which the results of the statement are to be resolved

Example
The following example demonstrates a typical implementation of
   
   const select:String = "SELECT FROM foo.bar";
   var statement:PreparedStatement = new PreparedStatement( select );