Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top