相关代码 |
|
void Page_Load(Object sender , EventArgs e) { SqlConnection conPubs; string strUpdate; SqlCommand cmdUpdate; conPubs = new SqlConnection( @"Server=localhost;Integrated Security=SSPI;database=Pubs" ); strUpdate = "Update Authors set au_lname='Smith' Where au_lname='Bennet'"; cmdUpdate = new SqlCommand( strUpdate, conPubs ); conPubs.Open(); cmdUpdate.ExecuteNonQuery(); conPubs.Close(); Response.Write("Author Updated!"); }
相关资源 |
|