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;
            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();

posted on 2009-02-20 14:26  wn323225  阅读(564)  评论(0)    收藏  举报