TIBCQuery result fields are read-only
Posted: Thu 02 May 2013 23:11
I'm migrating a project from Delphi 7 to Delphi XE3. I used to use dbExpress, now I'm using IBC by DevArt. I have figured out how to replace my old dbExpress TSQLQuery components with the TIBCQuery components (connecting them to a TIBCConnection now) and I can retrieve data into my TClientDataSet. All is well up to that point. However, I find that I cannot use my usual field update methods that I used to. Here is my old code:
(cds = TClientDataSet)
cdsApt.Edit;
cdsAptEML_SENT.AsDateTime := Now; <--- Error here now
cdsApt.Post;
cdsApt.ApplyUpdates(0);
I get an error at the line indicated, saying that the field cannot be updated.
I do not have anything in the SQLUpdate property of the TIBCQuery because in dbExpress, the TDataSetProvider would generate that automatically. I also noticed that there is a property called "SetFieldsReadOnly" which was True and I set it to False, but I still get the same error. The query I'm using pulls from about 6 different tables, so in the provider I made a "OnGetTableName" and set to the appropriate table name.
---------------------------
Debugger Exception Notification
---------------------------
Project myproject.exe raised exception class EDatabaseError with message 'Field 'EML_SENT' cannot be modified'.
---------------------------
Break Continue Help
---------------------------
Is there something else I need to do to get this to work correctly?
Thanks in advance for any help you can provide.
(cds = TClientDataSet)
cdsApt.Edit;
cdsAptEML_SENT.AsDateTime := Now; <--- Error here now
cdsApt.Post;
cdsApt.ApplyUpdates(0);
I get an error at the line indicated, saying that the field cannot be updated.
I do not have anything in the SQLUpdate property of the TIBCQuery because in dbExpress, the TDataSetProvider would generate that automatically. I also noticed that there is a property called "SetFieldsReadOnly" which was True and I set it to False, but I still get the same error. The query I'm using pulls from about 6 different tables, so in the provider I made a "OnGetTableName" and set to the appropriate table name.
---------------------------
Debugger Exception Notification
---------------------------
Project myproject.exe raised exception class EDatabaseError with message 'Field 'EML_SENT' cannot be modified'.
---------------------------
Break Continue Help
---------------------------
Is there something else I need to do to get this to work correctly?
Thanks in advance for any help you can provide.