Page 1 of 1

DbpQuery Problem

PostPosted: Wed Jan 09, 2008 6:26 am
by Frederik Gerritsen
Hi to all,

First to all of you the best wishes for 2008.
Now my problem

I did made a dbpshowgrid, so far so good and i see all the data i need,
but when i do make a dbpquery dor it, with the following in structies.

dbpQuery "Urenverantwoording" "Werknemers" "[#34]Afdelings Nummer[#34] = [#34]110[34]" or if i try dbpQuery "Urenverantwoording" "Werknemers" "Afdelings Nummer = [#34]110[34]". I get the everytime a syntax error like "operator or expression is missing".

Have someone a solution for this problem i have ?

With regads

PostPosted: Wed Jan 09, 2008 7:16 am
by Gaev

Don't know if "spaces" are allowed in "field names" ... so you might try to (temporarily) do a query on another field that does not have a space in its name.

Also, if "Afdelings Nummer" ("Department number") is defined as a numeric field, you might try doing the query without the [#34] syntax around the 110.

PostPosted: Wed Jan 09, 2008 11:23 am
by Neosoft Support
As a rule you should probably avoid using field names with spaces if you can, but some databases do allow it. These field names should be enclosed in "[" "]" when used in SQL expression or queries. Since "[" and "]" have special meaning in NeoBook, you will need to use a special ASCII variable to represent them in SQL - [#91] for "[" and [#93] for "]". For example:

Code: Select all
dbpQuery "Urenverantwoording" "Werknemers" "[#91]Afdelings Nummer[#93] = [#34]110[34]"

PostPosted: Fri Jan 11, 2008 4:36 am
by Frederik Gerritsen
Hi Dave en Gaev,

I did worked your suggestions out, it did work sodar, but not in every way like "FileEx". My suggestion is simple, don't do use spaces in DB Variables.