Strange behavior in Find in Database (2004.4)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange behavior in Find in Database (2004.4)

Jim Redfield
Mac OSX 10.4.7 with 4D 2004.4

I have a line of code (written in 1992) as follows:

$string:="\\Analyst"

When I Find in Database the string "\\Analyst" (including the "  
marks) nothing is found. If I search for the string Analyst" it finds  
a number of occurrences including the line above.

If I Find in Database for \\ a number of occurrences are found, but  
not the line of code above.

If I Find in Database for "\\ nothing is found.

If I do a find within a page for \\ 4d will find the string. If I  
find within a page for "\\ 4d also finds the string.

What is it about the Find in Database search with the embedded \\  
within quotes that causes problems?

Thanks in advance.

Jim Redfield


**********************************************************************
Learn by example. Download free 4D 2004 example applications today!
http://www.4d.com/2004/examples.html

4th Dimension Internet Users Group (4D iNUG)
FAQ:  <http://www.4d.com/support/faqnug.html>
Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
Unsub:  mailto:  [hidden email]
**********************************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior in Find in Database (2004.4)

Brad Perkins
Jim,

My experience is that there are a number of character sequences like this
that will cause Find in Database to not return expected results.
Back in the 6.5 days I reported this as a bug but don't think it was ever
resolved. I would imagine that 4D Inc. has purged it from the bug DB too.
Unfortunately I don't remember the exact problem I had but do recall that a
lot of the problem characters would have been regular expression
metacharacters (such as \) if such a search feature were provided. My
suspicion was that they'd either tried to use or develop a search library
that had regexp support but the feature wasn't enabled.

Also consider that the backslash is 4D's string escape character. Maybe you
need to try \\\\Analyst?

-- Brad Perkins

On 7/12/06, Jim Redfield <[hidden email]> wrote:

>
> Mac OSX 10.4.7 with 4D 2004.4
>
> I have a line of code (written in 1992) as follows:
>
> $string:="\\Analyst"
>
> When I Find in Database the string "\\Analyst" (including the "
> marks) nothing is found. If I search for the string Analyst" it finds
> a number of occurrences including the line above.
>
> If I Find in Database for \\ a number of occurrences are found, but
> not the line of code above.
>
> If I Find in Database for "\\ nothing is found.
>
> If I do a find within a page for \\ 4d will find the string. If I
> find within a page for "\\ 4d also finds the string.
>
> What is it about the Find in Database search with the embedded \\
> within quotes that causes problems?
>
> Thanks in advance.
>
> Jim Redfield
>
>
> **********************************************************************
> Learn by example. Download free 4D 2004 example applications today!
> http://www.4d.com/2004/examples.html
>
> 4th Dimension Internet Users Group (4D iNUG)
> FAQ:  <http://www.4d.com/support/faqnug.html>
> Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
> Unsub:  mailto:  [hidden email]
> **********************************************************************
>
>
**********************************************************************
Learn by example. Download free 4D 2004 example applications today!
http://www.4d.com/2004/examples.html

4th Dimension Internet Users Group (4D iNUG)
FAQ:  <http://www.4d.com/support/faqnug.html>
Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
Unsub:  mailto:  [hidden email]
**********************************************************************

Reply | Threaded
Open this post in threaded view
|

Re: Strange behavior in Find in Database (2004.4)

Jim Redfield
Brad,

Thanks for the input. The quad \ solution, in many varieties, was  
tried with no success. I guess its just an undocumented feature of  
unknown use! :-)

Jim

On Jul 12, 2006, at 2:27 PM, Brad Perkins wrote:

> Jim,
>
> My experience is that there are a number of character sequences  
> like this
> that will cause Find in Database to not return expected results.
> Back in the 6.5 days I reported this as a bug but don't think it  
> was ever
> resolved. I would imagine that 4D Inc. has purged it from the bug  
> DB too.
> Unfortunately I don't remember the exact problem I had but do  
> recall that a
> lot of the problem characters would have been regular expression
> metacharacters (such as \) if such a search feature were provided. My
> suspicion was that they'd either tried to use or develop a search  
> library
> that had regexp support but the feature wasn't enabled.
>
> Also consider that the backslash is 4D's string escape character.  
> Maybe you
> need to try \\\\Analyst?
>
> -- Brad Perkins
>
> On 7/12/06, Jim Redfield <[hidden email]> wrote:
>>
>> Mac OSX 10.4.7 with 4D 2004.4
>>
>> I have a line of code (written in 1992) as follows:
>>
>> $string:="\\Analyst"
>>
>> When I Find in Database the string "\\Analyst" (including the "
>> marks) nothing is found. If I search for the string Analyst" it finds
>> a number of occurrences including the line above.
>>
>> If I Find in Database for \\ a number of occurrences are found, but
>> not the line of code above.
>>
>> If I Find in Database for "\\ nothing is found.
>>
>> If I do a find within a page for \\ 4d will find the string. If I
>> find within a page for "\\ 4d also finds the string.
>>
>> What is it about the Find in Database search with the embedded \\
>> within quotes that causes problems?
>>
>> Thanks in advance.
>>
>> Jim Redfield
>>
>>
>> *********************************************************************
>> *
>> Learn by example. Download free 4D 2004 example applications today!
>> http://www.4d.com/2004/examples.html
>>
>> 4th Dimension Internet Users Group (4D iNUG)
>> FAQ:  <http://www.4d.com/support/faqnug.html>
>> Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
>> Unsub:  mailto:  [hidden email]
>> *********************************************************************
>> *
>>
>>
> **********************************************************************
> Learn by example. Download free 4D 2004 example applications today!
> http://www.4d.com/2004/examples.html
>
> 4th Dimension Internet Users Group (4D iNUG)
> FAQ:  <http://www.4d.com/support/faqnug.html>
> Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
> Unsub:  mailto:  [hidden email]
> **********************************************************************
>

**********************************************************************
Learn by example. Download free 4D 2004 example applications today!
http://www.4d.com/2004/examples.html

4th Dimension Internet Users Group (4D iNUG)
FAQ:  <http://www.4d.com/support/faqnug.html>
Archive:  <http://dir.gmane.org/gmane.comp.lang.inug-4d.tech>
Unsub:  mailto:  [hidden email]
**********************************************************************