Board index » delphi » Hmmmm Odd CDS behavior...

Hmmmm Odd CDS behavior...


2003-08-19 09:57:56 PM
delphi93
Windows XP PRO
512MB Ram
D7 E
Data setup:
SQLQuery
DataSetProvider
DataSet
ClientDataSet
The CDS fields are set using the CDS Field editor because we are not using a
table from the DB within the data group because we are TRYING to limit the
amount of data being imported to the CDS form the DB.
We execute a SQLQuery that finds the specific record, but when application
attempts to populate the form with the retreived data an error is raised
that field not found:
cds<...>: Field <...>not found.
But if one looks at the field editor of the cds, the field is there.
Would it be better to populate the CDS in code rather than with the cds
field editor?
What really odd is that last night the code was working fine. Loaded it this
morning and we got the field not found error.
--
Hal Davison
Davison Consulting
 
 

Re:Hmmmm Odd CDS behavior...

Hal,
Can you explain a little bit more about your data setup?
You have a SQLQuery->DataSetProvider->ClientDataset, what is the Dataset you
have listed?
The fields in the SQLQuery (preferably) do not change and you shouldn't
'execute' the SQLQuery (let the cds do that) Set the relationships as above
(SQLQuery->DataSetProvider->ClientDataset) and deal only with the
ClientDataset component (forget the SQLQuery component is even there).
Here is an excellent article on using TClientDataSets...
community.borland.com/article/0,1410,22571,00.html
I use the DataSnap components (TClientDataSets, TLocalConnection, etc)
extensively (in D6, MS SQL, ADO and BDE), so if you need a few examples, let
me know.
krf
"Hal Davison" <XXXX@XXXXX.COM>writes
Quote
Windows XP PRO
512MB Ram
D7 E

Data setup:
SQLQuery
DataSetProvider
DataSet
ClientDataSet

The CDS fields are set using the CDS Field editor because we are not using
a
table from the DB within the data group because we are TRYING to limit the
amount of data being imported to the CDS form the DB.