GRQNET
|
| Posted: 05/27/2004, 11:22 AM |
|
Hi I am attempting to create a List Box that allows the user to do a muliple
selection of towns and be able to display any of the results search for.
Right now my code just does an AND function. That is if I select the towns
Greenlawn and Melville, the search results show nothing instead of BOTH
towns.
I am using ASP.
Here is my SQL code for the table.
SELECT DISTINCT c21aalistings.new_bath_tot, c21aalistings.ml_link,
c21aalistings.bath_full, c21aalistings.bath_half, c21aalistings.bath_tot,
c21aalistings.br, c21aalistings.constr, c21aalistings.county,
c21aalistings.lp_dol, c21aalistings.ml_num, c21aalistings.sd_name,
c21aalistings.sd_num, c21aalistings.style, c21aalistings.taxes,
c21aalistings.town FROM c21aalistings LEFT JOIN NassauTowns ON
c21aalistings.town = NassauTowns.town
WHERE (NassauTowns.town IN ('{s_nassautown}') OR ('{s_nassautown}'='0') )
Thanks.
Anthony.
|
|
|
 |
GRQNET
|
| Posted: 05/27/2004, 11:38 AM |
|
I notice that if I change the code to what the CodeCharge ExamplePack says.
SELECT DISTINCT c21aalistings.new_bath_tot, c21aalistings.ml_link,
c21aalistings.bath_full, c21aalistings.bath_half, c21aalistings.bath_tot,
c21aalistings.br, c21aalistings.constr, c21aalistings.county,
c21aalistings.lp_dol, c21aalistings.ml_num, c21aalistings.sd_name,
c21aalistings.sd_num, c21aalistings.style, c21aalistings.taxes,
c21aalistings.town FROM c21aalistings LEFT JOIN NassauTowns ON
c21aalistings.town = NassauTowns.town
WHERE (NassauTowns.town IN ({s_nassautown}) OR ('{s_nassautown}'='0') )
(I removed the quotes around the first {s_nassautown} )
I get the following error:
Form: Grid c21aalistings
Error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 2. (Microsoft OLE DB Provider for ODBC Drivers)
Anthony
==========================================================
"GRQNET" <Webmaster@grq.net> wrote in message
news:c95bln$kov$1@news.codecharge.com...
> Hi I am attempting to create a List Box that allows the user to do a
muliple
> selection of towns and be able to display any of the results search for.
> Right now my code just does an AND function. That is if I select the
towns
> Greenlawn and Melville, the search results show nothing instead of BOTH
> towns.
> I am using ASP.
>
> Here is my SQL code for the table.
>
> SELECT DISTINCT c21aalistings.new_bath_tot, c21aalistings.ml_link,
> c21aalistings.bath_full, c21aalistings.bath_half, c21aalistings.bath_tot,
> c21aalistings.br, c21aalistings.constr, c21aalistings.county,
> c21aalistings.lp_dol, c21aalistings.ml_num, c21aalistings.sd_name,
> c21aalistings.sd_num, c21aalistings.style, c21aalistings.taxes,
> c21aalistings.town FROM c21aalistings LEFT JOIN NassauTowns ON
> c21aalistings.town = NassauTowns.town
> WHERE (NassauTowns.town IN ('{s_nassautown}') OR ('{s_nassautown}'='0') )
>
>
> Thanks.
>
> Anthony.
>
>
>
|
|
|
 |
|