Source language: Translate to:

NeoBookDB search *?

Questions about NeoBook PlugIns

Moderator: Neosoft Support

NeoBookDB search *?

Postby mishem » Thu Mar 05, 2015 6:34 am

When looking for a team dbfQuery characters *? the message type "query syntax error".

What is interesting ... Individually, * and ? finds no problems. This combination of +? also no problem.

Maybe there is a solution how to find *? ....
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: NeoBookDB search *?

Postby Gaev » Thu Mar 05, 2015 7:16 am

mishem:

Can you post a copy of the exact dbfQuery command you are trying to use ?

Maybe there is a solution how to find *?

Perhaps you can try placing an exclamation point ! at the start of the "filter" parameter value (in case NeoBook is trying to do a multiplication)

Also, try and replace * and ? with their respective [#xx] values.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: NeoBookDB search *?

Postby mishem » Thu Mar 05, 2015 8:28 am

Code: Select all
SetVar "[Result]" "[#42][#63]"
dbfQuery "[PubDir]Regex.dbf" "REGEX==[#34][Result][#34]"

I tried ....
And the exclamation point, and codes [#xx] ...
Generally events are as follows:
In ListBox1 selected item. At this point is the symbol "*?". Searched in the database field with these symbols .....
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm

Re: NeoBookDB search *?

Postby Gaev » Thu Mar 05, 2015 10:59 am

mishem:

Yes, dbfQuery does NOT like the combination of *? in the filter parameter ... in fact * followed by any character.

Not a perfect solution ... but here is how you might get around it ...
Code: Select all
 dbfQuery "[PubDir]Regex.dbf" "REGEX*[#34]*[#34] AND REGEX=[#34]?[#34]"

Note:

1) * is an undocumented comparator ... means "begins with"

2) will also return something like *abcd? ... so you may have to loop through the returned results to exclude such records ... but if you need to view the results in a Grid, it won't help.

The only other thing I can think of is to "store a substitute value for * in your database" ... :-( ... e.g. _asterisk_ ... something that is not likely to be otherwise contained in this field.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: NeoBookDB search *?

Postby mishem » Thu Mar 05, 2015 11:21 am

Gaev wrote:
Code: Select all
 dbfQuery "[PubDir]Regex.dbf" "REGEX*[#34]*[#34] AND REGEX=[#34]?[#34]"


An excellent option. I had not thought about it. Thanks.
mishem
 
Posts: 575
Joined: Mon Oct 08, 2012 1:51 pm


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron