programmatically determine whether records exist
Bob Haussmann
haussma at nextdimension.net
Thu Feb 12 16:52:47 PST 2015
We are trying to find a way to programmatically determine (i.e., in a batch
file-no user interaction) whether any given filePro database contains one or
more records (Windows environment, fP 5.7). Our first thought was to use
fpSQL to run a query like the following:
Set lines 1,1
Set output 'results.txt'
Select count(*) from [filename]
And then read results.txt. This works if the database contains records, but
if not, fpsql gives a messagebox saying "the file '[filename]' is empty",
and then sits waiting for the user to press ENTER. Further, it appears that
FPSQL does not respect PFMBTO (which would bypass this message after a set
period of time).
We also thought about checking to see if the size of key/data is zero,
however this wouldn't work if dexpand had been run.
Any suggestions?
Bob Haussmann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20150212/f44e14ef/attachment.html>
More information about the Filepro-list
mailing list