Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query problem with composed word like 'United Kingdom' 1

Status
Not open for further replies.

vias

Programmer
Apr 25, 2000
54
GB
Hi,

I have a simple query:

select * from users where country = 'united states'

I display 9 records per page using SQL Server and ASP. For example,
if the query returns 14 records, I display the
first 9 on page 1 and records 10 to 14 on page 2
and so on.

If the query doesn't find any record, i have a message
like '0 records found'

Problem is if have country composed of two words like
'United States' or 'United Kingdom', it displays
the first page but on the second page it displays
'0 records found' even if there are records to be displayed.

However, I have no problem with one word country like 'France' or 'Canada'

Any help would be appreciated.

Thanks,
Vias
 
ensure that where you keep this value in the page, the value attribute is using quotes. I assume that you are holding the search value in some hidden field right?

<input type=&quot;hidden&quot; VALUE=&quot;<%=SearchItem%>&quot;>

otherwise it does not receive the second part of the phrase as it drops at the space

hth

Bastien

Any one have a techie job in Toronto, I need to work...being laid off sucks!
 
Bastien,


I changed it and it works fine.
Thanks for your help.

Vias
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top