> # .NET Public Objects/Interfaces Supported

> The .NET data provider supports the .NET public classes, interfaces, properties, and methods. The .NET data provider attaches the provider-specific prefix "SequeLink" to the names of the public objects, for example, SequeLinkConnection or SequeLinkCommand. In addition, the .NET data provider supports provider-specific properties and methods.

> The .NET data provider supports the public .NET objects, properties, and methods described in the following sections. See ".NET Code Examples" for sample code that uses these objects.

> ### SequeLinkCommand Object

> In addition to the public properties of the Command object, the SequeLinkCommand object supports the properties described in Table 10-4. The table includes the generic public properties of the Command object when provider-specific information supplements the standard descriptions.

> For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> Table 10-4. Properties of the SequeLinkCommand Object
> Property | Description
> --- | ---
> ArrayBindCount | Specifies the number of rows of parameters that will be used. The application must set this property before executing a command that uses parameter array binding. The count must equal the length of each of the arrays that is set for each parameter value. When set to 0 (the initial default), the application does not use parameter array binding.
> ArrayBindStatus | Enables the application to inspect the per row status after executing a command that uses parameter array binding. The property's type is an array of OracleRowStatus. Parameter array binding is performed as a single atomic operation. This means that if the operation succeeds, every entry will be set to OK; if the operation fails, none of the entries will be set to OK. The OracleRowStatus enumeration has the following possible values: OK. The operation succeeded. All entries are marked as OK. Failed. The operation failed. The data provider assigns this value to all status entries except for the row that caused the failure. SchemaViolation. When an operation fails, the data provider assigns this value to the row that caused the failure.
> RowSetSize | Limits the number of rows returned by any query executed on this Command object to the value specified at execute time. The data type for the Read-Write property is unsigned long. Valid values are 0 to 2147483647. When set to 0, the data provider does not limit the number of rows returned. The initial default is 0.

> ### SequeLinkCommandBuilder Object

> The SequeLinkCommandBuilder object automatically generates single-table SQL commands that are used to reconcile changes made to a DataSet with the SequeLink server. A SequeLinkCommandBuilder object is always associated with a SequeLinkDataAdapter object.

> Using a CommandBuilder object can have a negative effect on performance. Because of concurrency restrictions, the CommandBuilder does not generate efficient SQL statements. The end-user can often write more efficient update and delete statements than those that the CommandBuilder generates. In addition, the CommandBuilder object registers itself as a listener for the RowUpdating and RowUpdated events of its DataAdapter object. This means that two events must be processed for every row that is updated.

> In addition to the public properties of the CommandBuilder object, the SequeLinkCommandBuilder object supports the following property. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> Table 10-5. Properties of the SequeLinkCommandBuilder Object
> Property | Description
> --- | ---
> AllowUpdateWithoutKey | Allows the use of the SequeLinkCommandBuilder on a table that has no primary key or unique index. When set to True, a DataAdapter.Update can succeed when a single SQL statement updates multiple rows in the underlying table. Normally, each Update or Delete statement executed on a DataAdapter.Update changes only one row. The initial default is False.

> ### SequeLinkConnection Object

> In addition to the public properties of the Connection object, the SequeLinkConnection object supports the properties described in Table 10-6. Some properties return the values specified for the corresponding connection string attribute (see "Specifying Connection Options" for information on the connection string attributes).

> For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> Table 10-6. Properties of the SequeLinkConnection Object
> Property | Description
> --- | ---
> ApplicationId | Specifies the application ID that identifies the client application to the SequeLink service. This attribute is only required when the SequeLink service you are connecting to has been configured to limit access to specific applications. For more information about using application IDs to limit access to the SequeLink services, refer to the SequeLink Administrator's Guide.
> Host | Returns the value specified for the Host attribute in the connection string.
> Port | Returns the value specified for the Port attribute in the connection string.
> ServerDatasource | Returns the value specified for the ServerDatasource attribute in the connection string.
> ServerVersion | Returns the name and version of the database that the object is connected to.

> NOTE: To avoid dead connections being kept open on the database server, you must close or dispose every opened Connection object before it goes out of scope. Opened connections are not closed automatically when the memory is reclaimed by the garbage collector.

> ### SequeLinkDataAdapter Object

> The SequeLinkDataAdapter object uses SequeLinkCommand objects to execute SQL commands on the SequeLink Server database, to load the DataSet with data, and to reconcile the changed data in the DataSet to the database.

> The SequeLinkDataAdapter object supports the public properties of the DataAdapter object and has no provider-specific properties. For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> ### SequeLinkDataReader Object

> The SequeLinkDataReader object is a forward-only cursor that retrieves read-only records from a database. Performance is better than SequeLinkDataAdapter, but the result set cannot be modified.

> For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> NOTE: To avoid statements or cursors being kept open on the database server, be sure to close or dispose each SequeLinkDataReader object as soon as you are finished reading with it.

> ### SequeLinkError Object

> The SequeLinkError object collects information relevant to errors and warnings generated by the SequeLink server.

> For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> ### SequeLinkErrorCollection Object

> The SequeLinkErrorCollection object is created by a SequeLinkException to contain all the errors generated by the SequeLink server.

> The SequeLinkErrorCollection object supports the public properties of the ErrorCollection object, and has no provider-specific properties. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> ### SequeLinkException Object

> The SequeLinkException object is created and thrown when the SequeLink server returns an error. Exceptions generated by the data provider itself are returned as standard run time exceptions.

> The SequeLinkException object supports the public properties of the Exception object, and has no provider-specific properties. The properties apply to the last error generated, if multiple errors exist. The application should check the Count property of the SequeLinkErrorCollection returned in the Errors property of this object to determine whether there are multiple errors.

> For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> ### SequeLinkInfoMessageEventArgs Object

> The SequeLinkInfoMessageEventArgs object is passed as an input to the SequeLinkInfoMessageEventHandler and contains information relevant to a warning generated by the SequeLink server. See "Error Handling" for an example of using InfoMessage delegates to retrieve warning information.

> For information about SequeLinkInfoMessageEventArgs, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> ### SequeLinkParameter Object

> The SequeLinkParameter object represents a parameter to a SequeLinkCommand. In addition to the public properties of the Parameter object, the SequeLinkParameter object supports the properties described in Table 10-7.

> For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> Table 10-7. Properties of the SequeLinkParameter Object
> Property | Description
> --- | ---
> ArrayBindStatus | Determines whether any values in an array of SequeLinkParameterStatus entries should be bound as null. The SequeLinkParameterStatus enumeration contains the entry Null.
> SequeLinkDbType | Specifies the data types of the SequeLink server. See "Data Types" for more information about SequeLink data types.
> Value | Gets or sets the value of the parameter. This property is specified as an array of values when array binding is enabled (see the ArrayBindCount property of the "SequeLinkCommand Object"). Each array's length must match the value of the ArrayBindCount property. When specifying the array's values for binary type columns, the data will actually be specified as byte[]. This is an array of arrays of bytes. The data provider anticipates a jagged array as such when using parameter array binding with parameters.

> ### SequeLinkTrace Object

> The SequeLinkTrace object is created by the application to debug problems during development. For your final application, be sure to remove references to the SequeLinkTrace object. Setting the properties in the SequeLinkTrace object overrides the settings of the environment variables (see "Specifying Connection Options").

> See "Using Environment Variables" for information about using environment variables.

> The .NET data provider provides the option to create a Trace object to help application programmers debug problems during development. To maintain security, trace logs show passwords as five asterisks (*****).

> The following code fragment creates a Trace object. All subsequent calls to the data provider will be traced to that file.

>     SequeLinkTrace  MyTraceObject = new SequeLinkTrace();
>          MyTraceObject.TraceFile="C:\\MyTrace";
>          MyTraceObject.EnableTrace = 1;

> Table 10-8 provides the properties for the SequeLinkTrace object.

> Table 10-8. Properties of the SequeLinkTrace Object
> Property | Description
> --- | ---
> EnableTrace | When set to 1 or higher, enables tracing. When set to 0 (the initial default), tracing is disabled.
> RecreateTrace | When set to 1, recreates the trace file each time the application restarts. When set to 0 (the initial default), the trace file is appended.
> TraceFile | When DDTek_Enable_Trace is set to 1 or higher, this option specifies the path and name of the trace file. The initial default is \SequeLinkTrace.txt. If the file does not exist, the data provider creates it.
> NOTE: Setting EnableTrace starts the tracing process. Therefore, you must define the property values for the trace file before setting EnableTrace. Once the trace processing starts, the values of TraceFile and RecreateTrace cannot be changed.

> ### SequeLinkTransaction Object

> The SequeLinkTransaction object implements the IDBTransaction interface as specified in the .NET Framework.

> Table 10-9 provides the methods used by the SequeLinkTransaction object to support savepoints. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.

> Table 10-9. Methods of the SequeLinkTransaction Object
> Method | Description
> --- | ---
> Save | Specifies the savepoint name, and creates a savepoint in the transaction that can be used to roll back a portion of the transaction.
> Rollback(String) | Rolls back the specified transaction to a savepoint from a pending state.