Contents Index DBParameterCollection class LogCallback delegate

MobiLink Synchronization User's Guide
  Writing Synchronization Scripts in .NET
    MobiLink .NET API Reference

DBRowReader interface


public interface DBRowReader
Member of iAnywhere.MobiLink.Script

Represents a set of rows being read from a database. Executing the method DBCommand.executeReader( ) creates a DBRowReader.

The following example is a C# code fragment. It calls a function with the rows in the result set represented by the given DBRowReader.

DBCommand stmt = conn.CreateCommand();
stmt.CommandText = "select intCol, strCol from table1 ";
DBRowReader rs = stmt.ExecuteReader();
object[] values = rset.NextRow();
while( values != null ) {
handleRow( (int)values[0], (String)values[1] );
 values = rset.NextRow();
}
rset.Close();
stmt.Close();
NextRow( ) method 

public object[ ] NextRow( )

Retrieves and returns the next row of values in the result set. If there are no more rows in the result set, it returns NULL.

See SQLType enumeration.

Close( ) method 

public void Close( )

Cleans up resources used by this MLDBRowReader. After Close( ) is called, this MLDBRowReader cannot be used again.

ColumnNames property 

public string[ ] ColumnNames

Gets the names of all columns in the result set. The value is an array of strings corresponding to the column names in the result set.

ColumnTypes property 

public SQLType[ ] ColumnTypes

Gets the types of all columns in the result set. The value is an array of SQLTypes corresponding to the column types in the result set.


Contents Index DBParameterCollection class LogCallback delegate