Codeunit 18122338 EOS004 DB API Client
Provides access to the DB API client of the EOS FunctionAPI.
procedure Initialized(): Boolean
Specifies whether this instance has been correctly initialized with a service configuration.
Boolean
procedure Initialize(ConfigCode: Code[20])
Initializes this instance using the specified service configuration.
Code[20]
procedure Initialize(Config: Record "EOS004 Service Config.")
Initializes this instance using the specified service configuration.
Record "EOS004 Service Config."
procedure SuppressError(value: Boolean)
Boolean
procedure SuppressError(): Boolean
Boolean
procedure LastCommandDuration(): Text
Returns the duration of the last command execution.
Text[]
procedure ListProviders(var result: List of [Text])
Returns a list of all available database providers in a list. This is a TryFunction.
result List[Text]
The list of available providers.
procedure ListProviders(var Result: Record "Name/Value Buffer")
Returns a list of all available database providers in a Name/Value Buffer. This is a TryFunction.
Record "Name/Value Buffer"
procedure CreateConnection(ProviderName: Text;ConnectionString: Text;DatabaseName: Text;var ConnectionId: Guid)
Creates a new connection. This is a TryFunction.
ProviderName Text[]
The database provider to use.
ConnectionString Text[]
The connection string to pass to the provider.
DatabaseName Text[]
The name of the database to connect to.
ConnectionId Guid
Will contain the ID of the created connection.
procedure CreateConnection(ProviderName: Text;ConnectionString: Text;DatabaseName: Text;AdditionalProperties: Dictionary of [Text, Text];var ConnectionId: Guid)
Creates a new connection. This is a TryFunction.
ProviderName Text[]
The database provider to use.
ConnectionString Text[]
The connection string to pass to the provider.
DatabaseName Text[]
The name of the database to connect to.
AdditionalProperties Dictionary[Text,Text]
Additional provider-specific properties.
ConnectionId Guid
Will contain the ID of the created connection.
procedure CreateConnection(DbConnSetupCode: Code[10]; var ConnectionId: Guid)
Creates a connection from a connection setup, by code. This is a TryFunction.
DbConnSetupCode Code[10]
The DB connection setup code.
ConnectionId Guid
The created connection ID.
procedure CreateConnection(DbConnection: Record "EOS004 DB Connection Setup"; var ConnectionId: Guid)
Creates a connection from a connection setup, by record. This is a TryFunction.
DbConnection Record "EOS004 DB Connection Setup"
ConnectionId Guid
The created connection ID.
procedure CloseConnection(ConnectionId: Guid)
Closes a connection.
ConnectionId Guid
The connection ID to close.
procedure GetConnection(ConnectionId: Guid; var Result: JsonArray)
Returns metadata about a given connection.
ConnectionId Guid
The connection ID.
Result JsonArray
The result.
procedure GetConnections(var Result: JsonArray)
Returns metadata of all currently open connections.
Result JsonArray
The result
procedure CloseReader(ConnectionId: Guid; ReaderId: Guid)
Closes a given data-reader on a given connection.
ConnectionId Guid
The connection ID
ReaderId Guid
The datareader ID
procedure ReadRows(ConnectionId: Guid; ReaderId: Guid; BatchSize: Integer; var ResultSet: JsonArray)
Read the specified number of rows from the a given data reader on a given connection.
ConnectionId Guid
The connection ID
ReaderId Guid
The datareader ID
BatchSize Integer
The number of records to read.
ResultSet JsonArray
The result.
procedure ExecuteNonQuery(ConnectionId: Guid; CommandText: Text; var affectedRows: Integer)
Executes a query on a given connection ID without capturing the result.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
affectedRows Integer
Returns the number of rows affected by the query.
procedure ExecuteNonQuery(ConnectionId: Guid; CommandText: Text; TransactionId: Guid; var affectedRows: Integer)
Executes a query on a given connection ID without capturing the result.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
TransactionId Guid
The transaction ID to execute the command on.
affectedRows Integer
Returns the number of rows affected by the query.
procedure ExecuteReader(ConnectionId: Guid; CommandText: Text; var ResultSet: Codeunit "EOS004 DB ResultSet")
Executes a query on a given connection ID, capturing the result as a data-reader.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
ResultSet Codeunit "EOS004 DB ResultSet"
The result set.
procedure ExecuteReader(ConnectionId: Guid; CommandText: Text; TransactionId: Guid; var ResultSet: Codeunit "EOS004 DB ResultSet")
Executes a query on a given connection ID, capturing the result as a data-reader.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
TransactionId Guid
The transaction ID to execute the command on.
ResultSet Codeunit "EOS004 DB ResultSet"
The result set.
procedure ExecuteScalar(ConnectionId: Guid; CommandText: Text; var Result: JsonObject)
Executes a query on a given connection ID, capturing the result as a scalar value.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
Result JsonObject
The result.
procedure ExecuteScalar(ConnectionId: Guid; CommandText: Text; TransactionId: Guid; var Result: JsonObject)
Executes a query on a given connection ID, capturing the result as a scalar value.
ConnectionId Guid
The connection ID.
CommandText Text[]
The command to be executed.
TransactionId Guid
The transaction ID to execute the command on.
Result JsonObject
The result.
procedure CreateTransaction(ConnectionId: Guid; var TransactionId: Guid)
Creates a new transation.
ConnectionId Guid
The connection ID to create the transaction on.
TransactionId Guid
Returns the ID of the transaction that has been created.
procedure CommitTransaction(ConnectionId: Guid; TransactionId: Guid)
Commits an open transaction.
ConnectionId Guid
The connection ID that the transaction to commit belongs to.
TransactionId Guid
The transaction ID to be committed.
procedure RollbackTransaction(ConnectionId: Guid; TransactionId: Guid)
Rolls back an open transaction.
ConnectionId Guid
The connection ID that the transaction to rollback belongs to.
TransactionId Guid
The transaction ID to be rolled back.
procedure GetReaders(ConnectionId: Guid; var Result: JsonArray)
Returns a list of all open data-readers on a given connection.
ConnectionId Guid
The connection ID.
Result JsonArray
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.