UltraLite.NET User's Guide
Understanding UltraLite Development
Accessing and manipulating data with the Table API
The following code opens the MyTable table and scrolls through its rows, displaying the value of the MyColumn column for each row.
Table t = conn.GetTable( "MyTable" ); short colID = t.Schema.GetColumnID( "MyColumn" ); t.Open(); t.MoveBeforeFirst(); while ( t.MoveNext() ){ System.Console.WriteLine( t.GetString( colID ) ); }
You expose the rows of the table to the application when you open the table object. By default, the rows are exposed in order by primary key value, but you can specify an index to access the rows in a particular order. The following code moves to the first row of the MyTable table as ordered by the ix_col index.
Table t = conn.GetTable("MyTable"); t.Open( "ix_col" ); t.MoveFirst();
For more information, see iAnywhere.UltraLite.Table iAnywhere.UltraLite.TableSchema and iAnywhere.UltraLite.Connection in the online API Reference.