Statement Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Statement class executes a static SQL statement and obtains the results it produces.
public ref class Statement : Microsoft::Dynamics::Ax::Xpp::XppObjectBase
[Microsoft.Dynamics.Ax.Xpp.KernelClass]
public class Statement : Microsoft.Dynamics.Ax.Xpp.XppObjectBase
[<Microsoft.Dynamics.Ax.Xpp.KernelClass>]
type Statement = class
inherit XppObjectBase
Public Class Statement
Inherits XppObjectBase
- Inheritance
- Attributes
Remarks
Only one per Statement can be open at any point in time. Therefore, if the reading of one ResultSet is interleaved with the reading of another, each must have been generated by different Statements. Record and field level securities are not enforced on the Statement class. Therefore, make sure you are not exposing data returned to the user without doing explicit security validation. All statement executed methods implicitly close a statement's current ResultSet if an open one exists.
The following example demonstrates the Statement class.
static void example()
{
Connection Con;
Statement Stmt;
ResultSet R;
SqlStatementExecutePermission perm;
str sql = 'SELECT VALUE FROM SQLSYSTEMVARIABLES';
Con = new Connection();
Stmt = Con.createStatement();
perm = new SqlStatementExecutePermission(sql);
perm.assert();
R = Stmt.executeQuery(sql);
while ( R.next() )
{
print R.getString(1);
}
}
Constructors
Statement() | |
Statement(Connection) | |
Statement(IntPtr) |
Fields
kernelClass | (Inherited from XppObjectBase) |