truncated result set - UpdatingTable

jimpoe

Member²
D5, DOA 3.4.3, Oracle 8.1.7.

I have a simple query being run in a DOA dataset:
SELECT
ST.ST_ID,
ST.DSCR as ST_DSCR,
CN.CNTY_ID,
CN.DSCR as CNTY_DSCR,
C.CITY_ID,
C.DSCR as CITY_DSCR,
Z.ZIP_ID,
Z.DSCR as ZIP_DSCR
FROM ST, CNTY CN,
CITY C, ZIP Z
WHERE
ST.ST_ID = CN.ST_ID
and
C.CNTY_ID = CN.CNTY_ID
and
Z.CITY_ID = C.CITY_ID
and
Z.DSCR = :PZ_DSCR

If :PZ_DSCR is '94558' the result set should contain two records. When I
run this query in an PL/SQL Developer, it works correctly. When I run this
query at designtime from the DOA dataset the result set is correct. At
runtime the query is run and the Monitor shows that 2 records are being
returned, but the clientdataset.recordcount = 1. PacketRecords is set
to -1. I've tried putting ClientDataSet.Last before testing the
RecordCount.

The only way I can get it to work is to set UpdatingTable=ZIP. This dataset is only used for 'Select'. Other sites work correctly without setting this property.

We ran across this problem a few months ago using a stored procedure. We could not resolve the need for setting the UpdatingTable property.

Any ideas?

--
Jim Poe (jpoe@fulcrumit.com)
 
The primary key of the updating table must uniquely identify a record in the result set. If this is not the case, the client dataset will discard records that it considers 'duplicate' (in other words, records with the same values for the primary key columns).

The updating table is the table entered in the UpdatingTable property, or, if this is empty, the first table in the from clause of the select statement.

------------------
Marco Kalter
Allround Automations
 
Back
Top