BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HowTo: substitution variable in cds via DOA and TDatasetprov

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Fritz Franz
Guest





PostPosted: Mon Apr 19, 2004 9:49 am    Post subject: HowTo: substitution variable in cds via DOA and TDatasetprov Reply with quote



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





PostPosted: Mon Apr 19, 2004 1:25 pm    Post subject: Re: HowTo: substitution variable in cds via DOA and TDataset Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.