Issue a command that updates a row.
For C#:
AseConnection conn = new AseConnection( c_connStr );
For Visual Basic .NET:
Dim conn As New AseConnection(c_connStr)
For C#:
conn.Open();
For Visual Basic .NET:
conn.Open()
For C#:
AseCommand updateCmd = new AseCommand( "UPDATE publishers " + "SET pub_name = 'My Publisher' " + "WHERE pub_id='9901'", conn );
For Visual Basic .NET:
Dim updateCmd As New AseCommand( _ "UPDATE publishers " + _ "SET pub_name = 'My Publisher' " + _ "WHERE pub_id='9901'", _ conn )
For more information, see Using stored procedures and AseParameter class.
For C#:
int recordsAffected = updateCmd.ExecuteNonQuery();
For Visual Basic .NET:
Dim recordsAffected As Integer = updateCmd.ExecuteNonQuery()
For C#:
AseCommand selectCmd = new AseCommand( "SELECT * FROM publishers", conn ); AseDataReader dr = selectCmd.ExecuteReader(); dataGrid.DataSource = dr;
For Visual Basic .NET:
Dim selectCmd As New AseCommand(_ "SELECT * FROM publishers", conn) Dim dr As AseDataReader = selectCmd.ExecuteReader() DataGrid.DataSource = dr
For C#:
dr.Close(); conn.Close();
For Visual Basic .NET:
dr.Close() conn.Close()