Can't insert new record in TOracleDataSet

nuke1

Member
Hi,
I'm using your trial component for Delphi 6.
Now I'm developing an application that export a table from paradox to oracle9i:
...
odsIns.SQL.Text := 'SELECT * FROM '+TabName+' ORDER BY COD_RISULT';
odsIns.Open;
while not tbPDX.Eof do
begin
//here Error:Cannot modify a ReadOnly Dataset
odsIns.Insert;
for i := 0 to tbPDX.FieldCount - 1 do
odsIns.Fields.Value := tbPDX.Fields.Value;
odsIns.Post;
...
What can I resolv this problem?
Thanks,
Davide
 
You have to include the column rowid in the select statement.....
Originally posted by nuke1:
Hi,
I'm using your trial component for Delphi 6.
Now I'm developing an application that export a table from paradox to oracle9i:
...
odsIns.SQL.Text := 'SELECT * FROM '+TabName+' ORDER BY COD_RISULT';
odsIns.Open;
while not tbPDX.Eof do
begin
//here Error:Cannot modify a ReadOnly Dataset
odsIns.Insert;
for i := 0 to tbPDX.FieldCount - 1 do
odsIns.Fields.Value := tbPDX.Fields.Value;
odsIns.Post;
...
What can I resolv this problem?
Thanks,
Davide
 
Back
Top