本人用vs2010 C# asp.net做一个简单的后台管理数据库的网站。在删除也中有三个txtbox是输入检索词。怎么写这个删除语句啊?

解决方案 »

  1.   

    delete from tb1 where
    字段1= txb1.Text and 字段2 =  txb2.Text  and 字段3 =  txb3.Text 
      

  2.   

    "delete from tb1 where
    字段1= '"+txb1.Text+"' and 字段2 = '"+txb2.Text+"' and 字段3 = '"+txb3.Text 
      

  3.   

    这个就可以要看你怎么设计的,
    你想写一个数据处理类 ,参数做为变量 就把 SQL 语句 封装到一个类的方法里.不管怎么样, 删除的语句都是一样的 , "delete from tb1 where + 条件, 这个条件就有你的 用程序组织了.