CreateDataSet is useful only if you put all the field definitions in the
FieldDefs property of the CDS. Look at the property in the object
inspector - it should bring up a collection editor which should have all the
fields defined there.
This is different from the Fields collection which is what pops up when you
double click the client dataset. If you have persistant fields, (i.e. if you
see anything in the dialog that comes up when you double click the client
dataset) you must ensure that the FieldDefs collection is filled up with
exactly those fields that are persistant, or the error you mention pops up.
Deepak Shenoy
Agni Software
http://www.agnisoft.com
----- Original Message -----
From: "Mark Derricutt" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 7:39 AM
Subject: [DUG]: client data sets
> As no one seems to have replied to my post on dug-db, I'll ask it here,
I'm
> getting some problems with a client dataset when the underlying query
> (linked via a provider) is empty. The cds has persistent tfield objects
> setup in the IDE, and on the OnBeforeOpen() event I'm creating 2-3 more
> TField objects if the database has them avaialble.
>
> The problem I'm getting, when calling CreateDataSet() I'm getting "cdsJob:
> Field 'release_ref' not found" which was of the TField's I created in the
> event.
>
> When I call CreateDataSet, what is happening? Is it creating a total
blank
> dataset? Does it check the provider (and thus the query) that all the
field
> definitions are the same? This is the first time I've really used
> ClientDataSet's and they're not being too friendly to me :(
>
> mark
>
>
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"