|
Home > Archive > dBASE Questions and Answers > February 2006 > EMPTY() not working on long (integer) fields???
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
EMPTY() not working on long (integer) fields???
|
|
| Pieter van Heerden 2006-02-10, 3:24 am |
| I use one table as a source for a sql-lookup on a form. I want the ability open a form based on the sql-lookup table so that the full content of the row that is linked through the sql-lookup facility can be seen. This has been done successfully. Howeve
r, if I want to test for instances where the field in the open rowset is empty, in other words no sql-lookup link has been established yet, the problem is that testing with EMPTY() returns TRUE in all instances, even in cases where an sql-lookup has been
established and the field therefore contains data.
The asking sql-lookup field is defined as "long" and it refers to the primary key (autoincrement) in the lookup table.
Referencing any other field as follows:
form.rowset.fields["wuasubid"].value := form.wuasubid
works every time. but referencing the field from which the sql-lookup is initiated as:
if empty(form.rowset.fields["farmerid"].value)
does not give the "correct" response, it returns true whatever the content of the field.
I have tried full referencing:
if empty(form.farmdatamodule1.farm1.rowset.fields["farmerid"].value)
with similar lack of correct response
Please advise.
| |
| Ronnie MacGregor 2006-02-10, 3:24 am |
|
On Fri, 10 Feb 2006 01:24:26 -0500
Pieter van Heerden said :
> Please advise.
This might not be an "empty()" problem, but more that the row pointer for the
lookup rowset is not positioned correctly. Try forcing the lookup rowset to the
correct row and then testing your empty() line.
--
Ronnie MacGregor
Scotland
Ronnie at
dBASEdeveloper
dot co dot uk
www.dBASEdeveloper.co.uk
|
|
|
|
|