dynamic query to insert record?


2003-07-16 11:58:11 AM
delphi7
Hi all,
I have TSQLQuery and TDataSetProvider in application server.
I have TClientDataSet in client application pointing to the provider. I
would like to write a dynamic query to insert record. Assuming that I want
to insert the values into a tableA with the structure below:
tableA:
FIELD1 VARCHAR(10)
FIELD2 TIMESTAMP
FIELD3 INTEGER
Assuming that I have 3 variables to be updated into the tableA:
strField1
dtField2
intField3
With the following code, I have problem assigning the correct string into
the CommandText.
if cdttableA.Active then cdttableA.Close;
cdttableA.CommandText := ????
cdttableA.Open;
So what value should the CommandText property of ClientDataSet assign with?
From: Paul