Microsoft 开发人员网络 > 论坛主页 > Visual C# General > How to compare a dataBase value to retrieve data
提出问题提出问题
 

已答复How to compare a dataBase value to retrieve data

  • 2009年11月4日 14:11Mitja Bonca 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
              
                    string SearchWord = "SELECT FileNames FROM  Notices WHERE Notices.DocType = @WordDocument";
                    cmd.CommandText = SearchDoc;
                    SqlParameter param = new SqlParameter();
                    param.ParameterName = "@WordDocument";
                    param.Value = System.Data.SqlDbType.VarChar, 50,"Word2003 Document"; //How to define that it has to look on the value in the database?             
    
                   //Word2003 Document is a value in the database.
    

答案

全部回复