Collection Contents Previous Next PDF

UltraLite.NET User's Guide

iAnywhere.Data.UltraLite namespace

ULCommand class


Represents a pre-compiled SQL statement or query, with or without IN parameters. This object can be used to efficiently execute a statement or query multiple times.

Prototypes 

' Visual Basic
NotInheritable Public Class ULCommand
  Inherits Component, IDbCommand

// C#
public sealed class ULCommand :
  Component,
  IDbCommand

Remarks 

ULCommand objects can be created directly, or with the CreateCommand method method. This method ensures that the command has the correct transaction for executing statements on the given connection.

The Transaction property property must be reset after the current transaction is committed or rolled back.

ULCommand features the following methods for executing commands on an UltraLite.NET database:

Method Description
ExecuteNonQuery method Executes a statement that does not return a result set, such as a SQL INSERT, DELETE, or UPDATE statement.
ExecuteReader method Executes a SQL SELECT statement and returns the result set in a ULDataReader class.
ExecuteScalar method Executes a SQL SELECT statement and returns a single value.
ExecuteTable method UL Ext.: Retrieves a database table in a ULTable class for direct manipulation. The CommandText property is interpreted as the name of the table and IndexName property can be used to specify a table sorting order. CommandType property must be [external link] CommandType.TableDirect.

You can reset most properties, including the CommandText property property, and reuse the ULCommand object.

For resource management reasons, it is recommended that you explicitly close commands when you are done with them.

Implements: [external link] IDbCommand, [external link] IDisposable


ULCommand members
ULCommand constructor
ULCommand constructor
ULCommand constructor
ULCommand constructor
CommandText property
CommandTimeout property
CommandType property
Connection property
IndexName property
Parameters property
Plan property
Transaction property
UpdatedRowSource property
Cancel method
CreateParameter method
Dispose method
ExecuteNonQuery method
ExecuteReader method
ExecuteReader method
ExecuteScalar method
ExecuteTable method
ExecuteTable method
Prepare method

Collection Contents Previous Next PDF