kerem

kerem

  • NA
  • 81
  • 0

a mistake with the "Like" statement..help!..

Sep 9 2007 3:29 PM
dear friends,
 
I develop an Win application by using MS Access.I have got a problem in SQL statement.I have got a form that has got 2 ComboBox and a DataGridView.The name of the first is cmbCategories and the second one is cmbContent.Content is listing the content of categories.I use an array to transfer letters when I choose the category in cmbCategories as it is Alphabetical Array.When I choose a letter from cmbContent like A,B or another one,but no records is listing in the DataGridView.I try to use "Like" statement for this action.It is like this:
 
string strSQL = "select FilmName from films where FilmName like" + "'" + cmbContent.Text + "*'";
 

cmbContent has got the Alphabetical letters by sequence.I want to list the FilmName that is beginning as alphabetic.For example,when I choose letter A,the films begins A must be listed.Does anybody help me?Thanks for your help.

Answers (3)