Home How To Online Documentation Support Download Order
 

 

 

SACommand
SAConnection
SAException
SAField
SAParam

SAString
SADateTime
SANumeric
SAInterval

Enums and Typedefs


Class Members

Examples

SAField object

A command (an SQL statement or procedure) can have a result set after executing. If result set exists, a set of SAField objects is created implicitly. Each SAField object represents a column in result set.

With the methods of SAField object you can do the following actions with metadata:

  • Return the name of a field using Name method and field position in result set using Pos method;

  • Return the basic characteristics of a field with the FieldType, FieldPrecision, and FieldScale methods;

  • Return the declared size of a field calling FieldSize method;

  • Check if it is possible for the field value to be null with isFieldRequired method.

SAField object methods provide the following possibilities to work with field value:

You can not create SAField object by yourself. The Library always does it implicitly when needed. To get SAFieldobject use SACommand::Field method. You can get the number of fields created calling SACommand::FieldCount method.

All of the metadata field characteristics (field name, size, type, precision, scale) are available immediately after SAField object creating (generally after command preparing, but on some servers after command executing). A value of field is available only after fetching row from a result set (see SACommand::FetchNext method).

See also

SACommand

Problems and Questions

If you haven't found the answer to your questions or have some problems on using the Library, please, send e-mail to howto@sqlapi.com.