Visual C# Developer Center > Visual C# Forums > Visual C# General > How to compare a dataBase value to retrieve data
Ask a questionAsk a question
 

AnswerHow to compare a dataBase value to retrieve data

  • Wednesday, November 04, 2009 2:11 PMMitja Bonca Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
              
                    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.
    

Answers

All Replies