G
Globetrotter
I am new to C# and using VS2008 and SQL 2005. For doing some exercises I
have made the following code:
string name = tstxtName.Text + "%";
this.taCountry.FillByName(this.dsTest.Country, name);
Problem I have is that the % character behaves like there is one character
at that position while it need to behave like there are zero or more
characters in that position.
For example when I have a country with name USA, US% will show the record
with name USA while U% doesn't show anything. When I preview the data
directly within the Query Builder of VS2008, it works perfect.
Has anybody an idea what can be the problem?
have made the following code:
string name = tstxtName.Text + "%";
this.taCountry.FillByName(this.dsTest.Country, name);
Problem I have is that the % character behaves like there is one character
at that position while it need to behave like there are zero or more
characters in that position.
For example when I have a country with name USA, US% will show the record
with name USA while U% doesn't show anything. When I preview the data
directly within the Query Builder of VS2008, it works perfect.
Has anybody an idea what can be the problem?