SqlConnection myConnection = new SqlConnection("server=(local)\NetSDK;database=pubs;Trusted_Connection=yes");
SqlCommand myCommand = new SqlCommand(
                   "UPDATE Authors SET phone='(800) 555-5555' WHERE au_id = '123-45-6789'",
                    myConnection);myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
Dim myConnection As New SqlConnection("server=(local)\NetSDK;database=pubs;Trusted_Connection=yes")
Dim myCommand As New SqlCommand( _
                   "UPDATE Authors SET phone='(800) 555-5555' WHERE au_id = '123-45-6789'",  _
                    myConnection)myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
var myConnection:SqlConnection = new SqlConnection("server=(local)\NetSDK;database=pubs;Trusted_Connection=yes");
var myCommand:SqlCommand = new SqlCommand(
                   "UPDATE Authors SET phone='(800) 555-5555' WHERE au_id = '123-45-6789'",
                    myConnection);myCommand.Connection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();