Source language: Translate to:

dbfQuery question

General questions about NeoBook

Moderator: Neosoft Support

dbfQuery question

Postby KenHos » Thu Jul 14, 2016 12:58 pm

Hi - I'm using the db free plugin and when I use dbfQuery in fields that contain different numbers (1-12) the Query for 1 also count 10 and 11 making the count wrong. This is for our camp. We have twelve cabins numbered 1-12 and any thing beginning with a 1 is counted in the cabin 1 count
Here's a sample

dbfQuery "camp.dbf" "CABINNO.=1"
dbfQueryCount "camp.dbf" "[Count1]"
If "[dbfQueryResult]" "<" "1"
SetVar "[count1]" "0"

dbfShowAll "camp.dbf"
dbfQuery "camp.dbf" "CABINNO.=2"
dbfQueryCount "camp.dbf" "[Count2]"
If "[dbfQueryResult]" "<" "1"
SetVar "[count2]" "0"

And can I change the field type in the free db plugin....If so how!

Thanks so much( Camp starts Monday)
Posts: 11
Joined: Fri Jan 11, 2013 11:21 am

Re: dbfQuery question

Postby Gaev » Thu Jul 14, 2016 1:56 pm


1) This topic has been posted in the wrong Forum ... this forum is for the NEOAPPBUILDER product ... NeoBookDB plugin works with the NEOBOOK product.

2) I do not believe that NeoBookDB (which is just a bridge to DBase IV type of databases) allows field names that contain characters other than letters and numbers ... so get rid of the dots (after the CABINNO).

3) if your cabin numbers are 1 to 9, 10 to 12 ... and assuming that you defined the field as a string (not number) ...

a) try ...
Code: Select all
dbfQuery "camp.dbf" "CABINNO == 1"

... this same question was answered last week for another user on the forum ... always a good idea to search the forum first ... most of the time, you are not the first to encounter a problem.

b) if you plan to sort records on this field, best to name the cabins 01, 02, 03 etc. or you will get sorted records in a sequence like ...

User avatar
Posts: 3748
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 5 guests