Share via


Connection.createStatement Method

Definition

Overloads

createStatement()

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

createStatement(ResultSetType)
createStatement(ResultSetType, ResultSetConcurrency)

createStatement()

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

public:
 virtual Dynamics::AX::Application::Statement ^ createStatement();
public virtual Dynamics.AX.Application.Statement createStatement ();
abstract member createStatement : unit -> Dynamics.AX.Application.Statement
override this.createStatement : unit -> Dynamics.AX.Application.Statement
Public Overridable Function createStatement () As Statement

Returns

A data type value that is a new Statement object.

Remarks

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 https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection. You can use Query Elements in the AOT, views, and X++ Select statements as safer alternatives to executing SQL statements.

Applies to

createStatement(ResultSetType)

public:
 virtual Dynamics::AX::Application::Statement ^ createStatement(Dynamics::AX::Application::ResultSetType type1);
public virtual Dynamics.AX.Application.Statement createStatement (Dynamics.AX.Application.ResultSetType type1);
abstract member createStatement : Dynamics.AX.Application.ResultSetType -> Dynamics.AX.Application.Statement
override this.createStatement : Dynamics.AX.Application.ResultSetType -> Dynamics.AX.Application.Statement
Public Overridable Function createStatement (type1 As ResultSetType) As Statement

Parameters

Returns

Applies to

createStatement(ResultSetType, ResultSetConcurrency)

public:
 virtual Dynamics::AX::Application::Statement ^ createStatement(Dynamics::AX::Application::ResultSetType _resultSetType, Dynamics::AX::Application::ResultSetConcurrency _resultSetConcurrency);
public virtual Dynamics.AX.Application.Statement createStatement (Dynamics.AX.Application.ResultSetType _resultSetType, Dynamics.AX.Application.ResultSetConcurrency _resultSetConcurrency);
abstract member createStatement : Dynamics.AX.Application.ResultSetType * Dynamics.AX.Application.ResultSetConcurrency -> Dynamics.AX.Application.Statement
override this.createStatement : Dynamics.AX.Application.ResultSetType * Dynamics.AX.Application.ResultSetConcurrency -> Dynamics.AX.Application.Statement
Public Overridable Function createStatement (_resultSetType As ResultSetType, _resultSetConcurrency As ResultSetConcurrency) As Statement

Parameters

_resultSetType
ResultSetType

A ResultSetConcurrency enumeration that specifies ReadOnly by default.

_resultSetConcurrency
ResultSetConcurrency

A ResultSetConcurrency enumeration that specifies ReadOnly by default.

Returns

Applies to