R
Ricardo Luceac
I'm geting a object null reference in this method
SqlConnection cnn = new
SqlConnection("server=(local);database=varired;trusted_connection=true")
;
SqlCommand cmm = new SqlCommand();
cmm.Connection=cnn;
cnn.Open();
cmm.CommandText="Delete from estados where
id_estado="+Convert.ToInt32(lstEsts.SelectedItem.Value);
It gives the error in the last line, I don't know what's happening...
SqlConnection cnn = new
SqlConnection("server=(local);database=varired;trusted_connection=true")
;
SqlCommand cmm = new SqlCommand();
cmm.Connection=cnn;
cnn.Open();
cmm.CommandText="Delete from estados where
id_estado="+Convert.ToInt32(lstEsts.SelectedItem.Value);
It gives the error in the last line, I don't know what's happening...