string strcn = "Provider=SQLOLEDB;Initial Catalog=test;Data Source=MHRREQ08;User ID=sa;Password=;";
string strcmd;
object missing = System.Reflection.Missing.Value;
strcmd = "delete from BB where Sno=" + tb_Sno.Text;
ADODB.Command com = new ADODB.Command();
com.CommandText = strcmd;
com.ActiveConnection = strcon;
com.CommandType = ADODB.CommandTypeEnum.adCmdText;
com.Execute(out missing, ref missing, (int)ADODB.CommandTypeEnum.adCmdText);
rs.Close();
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ADODB.Connection strcon = new ADODB.Connection();
string strcn = "Provider=SQLOLEDB;Initial Catalog=test;Data Source=MHRREQ08;User ID=sa;Password=;";
string strcmd;
object missing = System.Reflection.Missing.Value;
strcmd = "delete from BB where Sno=" + tb_Sno.Text;
strcon.Execute(strcmd, out missing, (int)ADODB.CommandTypeEnum.adCmdText);
rs.Close();
浙公网安备 33010602011771号