trevorjdaniel
Member
- Joined
- Sep 24, 2009
- Messages
- 8
- Programming Experience
- 1-3
Hi,
I am having a problem selecting records from a databable.
This is what I am trying to achieve...
If I have a list of say..
banana
apple
orange
orange2
and people type in "a" - I want it to display all records. When they then type in "an", I want it to display banana, orange and orange2 but not apple
I thought I could do this with the "like" statement with %s either side but i wont work for me..
the code i am using is this
When i run the above code and put in "a" I only get apple at the moment.
Can anyone help please?
Thanks
Trev
I am having a problem selecting records from a databable.
This is what I am trying to achieve...
If I have a list of say..
banana
apple
orange
orange2
and people type in "a" - I want it to display all records. When they then type in "an", I want it to display banana, orange and orange2 but not apple
I thought I could do this with the "like" statement with %s either side but i wont work for me..
the code i am using is this
VB.NET:
Dim drs() As DataRow = dt.Select("name like '%" & strText & "%'")
When i run the above code and put in "a" I only get apple at the moment.
Can anyone help please?
Thanks
Trev