1

I have 2 datasets like following in my Delphi XE4 application:

object dsDestination: TpFIBDataSet

    object Field1: TFIBStringField
      FieldName = 'MYSTRING'
      Size = 1
      Transliterate = False
    ene

    object Field2: TFIBIntegerField
      FieldName = 'MYINT'
    end

  end

object dsSource: TpFIBDataSet

    object dsSourceMYSTRING: TFIBStringField
      FieldName = 'MYSTRING'
      Size = 1
      Transliterate = False
    end

    object dsSourceMYINT: TFIBIntegerField
      FieldName = 'MYINT'
    end

  end

When I try to following statement:

dsSource.Open;
dsDestination.OpenAsClone(dsSource);

I get following error on the last line

dsDestination: Field MYSTRING not found

Its all working fine in Delphi 7. My Delphi 7 application is using Firebird 2.5.1 while Delphi XE4 is using 2.5.2. I am using FIBPlus 7.5.

  • What is `TpFIBDataSet`? I don't see it in the standard VCL components or in the documentation anywhere, and can't find `OpenAsClone` in the docs either. – Ken White Sep 26 '13 at 14:38
  • @KenWhite - I am using Firebird database and FIBPlus instead of dbexpress. TpFIBDataSet is similar to TSQLDataSet in dbexpress. OpenAsClone function is defined in firebird's FIBDataSet.pas file. –  Sep 26 '13 at 14:45
  • 1
    Then you should [edit] your question to mention that you're using FIBPlus, so people know that when reading it. :-) (It helps to check and see if there's a tag for it as well; I've added it to your question for you.) – Ken White Sep 26 '13 at 14:50

1 Answers1

1

I found the cause of error:

When I saw the field editor of dsDestination dataset, it was filled with the fields of dsSource. I just deleted all the fields from field editor of dsDestination, build and compiled the project, and the problem was resolved.