1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    São Paulo - Brazil
    Rep Power

    Error in TDBEdit in Delphi XE?

    I'm migrating an application from Delphi 7 do Delphi XE.

    One of the screens use TDBEdit dialogs, TClientDataSet, TDataSetProvider and TADOQuery for include, alter and exclude records.

    As soon as I run the first time the new version compiled with Delphi XE it occurs the error:

    '-2147217873 is not a valid value for field ''ERROR_CODE''. The allowed range is 0 to 4294967295'

    on the ApplyUpdates(0) statement.

    I remove ApplyUpdates and get it back. In some moment the error mentioned disappears. Sometime later it occurs again and then disappears again.

    I'm in doubt about what do I must do... While testing without the ApplyUpdates I discover that the function to alter a record doesn't function OK without the ApplyUpdates, e.g., the oracle based SQL table isn't updated. The execution flow passes in Edit and in a Post delphi methods, but without ApplyUpdates the database isn't updated.

    May someone of you give me a suggestion about what do I must do in this case? I'm thinking if I leave the ApplyUpdates method the error mentioned below begins again in a moment in the future. Also there are many other functions of the application that use the same mechanism to include, alter and exclude records from other tables...

    Greetings from Sao Paulo - Brazil

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Rep Power
    The error actually did not happen in TDBEdit. That happened in the underlying field. To me it looks like that your field initially typed as signed integer ("ordinary" int), but later converted to unsigned integer (like cardinal or DWORD). See if you can change the field's type back to signed integer.

IMN logo majestic logo threadwatch logo seochat tools logo