Marc
|
| Posted: 02/22/2006, 10:23 AM |
|
Hello 
I have a problem with my search.
The database and everything is ok and the search is also working. There is no problem ...
The problem I have is that I'm searching in a field (textfield) with a zipcode. The zipcode has five numbers. Now I want to search with the like% (begins with).
If I type a 10 into the search field all zipcodes are appearing which containing a 10. For example 10456, 20105, 30610 a.s.o ...
I can not find a solution for that problem ....
What I made is:
Click on the search, At properties a click on the ..., selected the tables and made a query which looks like:
SELECT Name, Name1, Strasse, plz, ort
FROM Kundenverzeichnis
WHERE plz LIKE '{s_plz}%'
s_plz is the name of the field in the search
I have the following properties in the where clause:
Condition Type: Parameter
Field Name plz (that is the zipcode field)
Field Type text
Field Format empty
condition: begins with (like '...%)
Parameter s_plz
Parameter Type URL
Parameter Format: empty
Radiobutton use default value ...
Thats it ...
Hope everything is complete enough to help me If not please tell me what you need to know ...
Thanks for your help in advance !!!
Marc
|
|
|
 |
wkempees
|
| Posted: 02/22/2006, 10:39 AM |
|
Mart
Your SQL is OK.
even when plz Postleitzahl is text or numeric it should work.
It is now almost like search is doing LIKE '%{s_plz}%'
which would be the generated version.
Did you do a refresh and publish?
"Marc" <Marc@forum.codecharge> schreef in bericht
news:643fcac3f95993@news.codecharge.com...
> Hello 
>
> I have a problem with my search.
>
> The database and everything is ok and the search is also working. There is
> no
> problem ...
>
> The problem I have is that I'm searching in a field (textfield) with a
> zipcode.
> The zipcode has five numbers. Now I want to search with the like% (begins
> with).
>
> If I type a 10 into the search field all zipcodes are appearing which
> containing a 10. For example 10456, 20105, 30610 a.s.o ...
>
> I can not find a solution for that problem ....
>
> What I made is:
>
> Click on the search, At properties a click on the ..., selected the tables
> and
> made a query which looks like:
>
> SELECT Name, Name1, Strasse, plz, ort
> FROM Kundenverzeichnis
> WHERE plz LIKE '{s_plz}%'
>
> s_plz is the name of the field in the search
>
> I have the following properties in the where clause:
>
> Condition Type: Parameter
> Field Name plz (that is the zipcode field)
> Field Type text
> Field Format empty
> condition: begins with (like '...%)
> Parameter s_plz
> Parameter Type URL
> Parameter Format: empty
> Radiobutton use default value ...
>
> Thats it ...
>
> Hope everything is complete enough to help me If not please tell me
> what
> you need to know ...
>
> Thanks for your help in advance !!!
>
> Marc
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Marc
|
| Posted: 02/22/2006, 11:05 AM |
|
@wkempees
the sql is looking like this:
SELECT Name, Name1, Strasse, plz, ort
FROM Kundenverzeichnis
WHERE plz LIKE '{s_plz}%'
without the second % you have before {
Yes, I tried several things but I never tried to have the plz field as a number ... but as you mentioned it should work with text ...
Problem not solved ...
|
|
|
 |
wkempees
|
| Posted: 02/22/2006, 1:49 PM |
|
Marc,
You wrote:
> What I made is:
> Click on the search, At properties a click on the ..., selected the tables
> and
You are modifying the DataSource of the Grid that shows the result?
From your text it looks like you are changing something in the search?
"Marc" <Marc@forum.codecharge> schreef in bericht
news:643fcac3f95993@news.codecharge.com...
> Hello 
>
> I have a problem with my search.
>
> The database and everything is ok and the search is also working. There is
> no
> problem ...
>
> The problem I have is that I'm searching in a field (textfield) with a
> zipcode.
> The zipcode has five numbers. Now I want to search with the like% (begins
> with).
>
> If I type a 10 into the search field all zipcodes are appearing which
> containing a 10. For example 10456, 20105, 30610 a.s.o ...
>
> I can not find a solution for that problem ....
>
> What I made is:
>
> Click on the search, At properties a click on the ..., selected the tables
> and
> made a query which looks like:
>
> SELECT Name, Name1, Strasse, plz, ort
> FROM Kundenverzeichnis
> WHERE plz LIKE '{s_plz}%'
>
> s_plz is the name of the field in the search
>
> I have the following properties in the where clause:
>
> Condition Type: Parameter
> Field Name plz (that is the zipcode field)
> Field Type text
> Field Format empty
> condition: begins with (like '...%)
> Parameter s_plz
> Parameter Type URL
> Parameter Format: empty
> Radiobutton use default value ...
>
> Thats it ...
>
> Hope everything is complete enough to help me If not please tell me
> what
> you need to know ...
>
> Thanks for your help in advance !!!
>
> Marc
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Marc
|
| Posted: 02/22/2006, 2:09 PM |
|
@wkempees
YOU ARE SO WONDERFUL 
That was it ...
I was changing in the search... now i had a look to the result and there was the same window prefilled with the search I do not want to have ... just changed two lines and it works !!!
THANKS A LOT
|
|
|
 |
wkempees
|
| Posted: 02/22/2006, 2:13 PM |
|
Glad it's solved.
It came to me part by your text and part by the like %{s_plz}%' because that
was generated by the builder.
In your Search form you don't need a datasource.
Go on and prosper (..), boldly go where no one has gone before (Picard)
"Marc" <Marc@forum.codecharge> schreef in bericht
news:643fce131e89e5@news.codecharge.com...
> @wkempees
>
> YOU ARE SO WONDERFUL 
>
> That was it ...
>
> I was changing in the search... now i had a look to the result and there
> was
> the same window prefilled with the search I do not want to have ... just
> changed two lines and it works !!!
>
> THANKS A LOT
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Marc
|
| Posted: 02/22/2006, 2:28 PM |
|
Quote :Go on and prosper (..), boldly go where no one has gone before (Picard)
sounds good 
sometimes there are small things where we do not pay attention which are very important to go ahead 
Have a good n8 Thx !
|
|
|
 |
wkempees
|
| Posted: 02/22/2006, 2:31 PM |
|
keine dank
"Marc" <Marc@forum.codecharge> schreef in bericht
news:643fce59b5140b@news.codecharge.com...
> Quote :Go on and prosper (..), boldly go where no one has gone before
> (Picard)
>
> sounds good 
>
> sometimes there are small things where we do not pay attention which are
> very
> important to go ahead 
>
> Have a good n8 Thx !
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|