Issue a command that returns a complete result set.
For C#:
AseConnection conn = new AseConnection(connStr);
For Visual Basic .NET:
Dim conn As New AseConnection(connStr)
For C#:
try { conn.Open(); } catch (AseException ex) { <error handling> }
For Visual Basic .NET:
Try conn.Open() Catch ex As AseExecption <error handling> End Try
For C#:
AseCommand cmd = new AseCommand(_ "select au_lname from authors", conn );
For Visual Basic .NET:
Dim cmd As New AseCommand("select au_lname from authors", conn)
For more information, see Using Stored Procedures and AseParameter Class.
For C#:
AseDataReader reader = cmd.ExecuteReader();
For Visual Basic .NET:
Dim reader as AseDataReader = cmd.ExecuteReader()
For C#:
listAuthors.BeginUpdate();
while( reader.Read() ) {
listAuthors.Items.Add( reader.GetString( 0 ) ); } listAuthors.EndUpdate();
For Visual Basic .NET:
listAuthors.BeginUpdate() While reader.Read() listAuthors.Items.Add(reader.GetString(0)) End While listAuthors.EndUpdate()
For C#:
reader.Close();
conn.Close();
For Visual Basic .NET:
reader.close() conn.close()