 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Fritz Franz Guest
|
Posted: Mon Apr 19, 2004 9:49 am Post subject: HowTo: substitution variable in cds via DOA and TDatasetprov |
|
|
Hi there,
I have to send an SQL statement to the server using substitution variables.
The result has to be filled into an TClientDataSet. Usually I set the
variables od the Clientdateset, how transmits them via the provider to an
DOA-Component and through that to the ORACLE server (9.2i).
But how can I do this whith substitution variables?
Thx in advance,
Klaus
|
|
| Back to top |
|
 |
Eric Hill Guest
|
Posted: Mon Apr 19, 2004 1:25 pm Post subject: Re: HowTo: substitution variable in cds via DOA and TDataset |
|
|
| Quote: | I have to send an SQL statement to the server using substitution variables.
The result has to be filled into an TClientDataSet. Usually I set the
variables od the Clientdateset, how transmits them via the provider to an
DOA-Component and through that to the ORACLE server (9.2i).
But how can I do this whith substitution variables?
|
Use a TOracleDataSet to perform the query then use this code to load a TClientDataSet:
function CreateClientDataSet(From: TDataSet): TClientDataSet;
var
P: TProvider;
begin
P := TProvider.Create(nil);
try
Result := TClientDataSet.Create(nil);
P.DataSet := From;
Result.SetProvider(P);
Result.Open;
finally
P.Free;
end;
end;
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|