看看sql 语句。。
很简单的。。

解决方案 »

  1.   

    System.Data.OleDb.OleDbCommand  command ;
                 System.Data.OleDb.OleDbConnection cn;
     cn=new System.Data.OleDb.OleDbConnection("User ID=sa;Data Source=GW;Initial Catalog=bookinf;Use Procedure for Prepare=1;Provider=SQLOLEDB");
    // cn.Close();
    cn.Open(); command=new System.Data.OleDb.OleDbCommand("select count(*) from power where  man_name=? and pass=? ",cn) ;
    command.Parameters.Add("@man_id",System.Data.OleDb.OleDbType.VarChar,10).Value=textBox1.Text ;
    command.Parameters.Add("@pass",System.Data.OleDb.OleDbType.VarChar,10).Value =textBox2.Text ;
       
    MessageBox.Show (command.ExecuteScalar().ToString());这是个 sql2000的列子,你改改就行。。
      

  2.   


    这些我都会,楼上不明白我的意思
    我是想搜索IP1,IP2中都没有,但是在同一行这两个IP之间的那些IP