DataView LIKE function on Integer value
I have Sql table Tracks which keeps track information such as TrackID and
TrackName. I have c# application with textbox and listbox. I use dataSet
to retrieve sql table and when I write "3" on textbox, I want to get track
names on listbox which has TrackID as "3". My code follows:
lbxTracks.DataSource = new DataView(das.Tables[0], "TrackID LIKE " +
idNo.ToString(), "TrackName", DataViewRowState.CurrentRows);
But I get an error as LIKE function cannot be used on System.Int32..
Any ideas?
No comments:
Post a Comment