Connection.createStatement Method [AX 2012]

Creates a Statement object that is used to execute an SQL statement.

public Statement createStatement([ResultSetType resultSetType, ResultSetConcurrency resultSetConcurrency])

Run On

Server

Parameters

resultSetType
Type: ResultSetType Enumeration
A ResultSetType enumeration that specifies ForwardOnly by default.
resultSetConcurrency
Type: ResultSetConcurrency Enumeration
A ResultSetConcurrency enumeration that specifies ReadOnly by default.

Return Value

Type: Statement Class
A data type value that is a new Statement object.

There is risk of an SQL injection threat when you use the createStatement method to create an SQL statement and then allow a user to control input to the statement. For information about SQL injection, see http://go.microsoft.com/fwlink/?LinkId=114986.

You can use Query Elements in the AOT, views, and X++ Select statements as safer alternatives to executing SQL statements.

Community Additions

ADD
Show: