Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Exception "Inexact character conversion during translation"


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Apr 28, 2015 9:21 PM Last Post By: Dmitry Arefiev
Paulo Mariano

Posts: 29
Registered: 11/25/12
Exception "Inexact character conversion during translation"  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2015 1:39 PM
Hello.

In an Delphi XE6 / FireDAC application (ported from BDE), the following exception is raised when the Commit method is executed:
[FireDAC][Phys][ODBC][Informix][Informix ODBC Driver] Inexact character conversion during translation.

Please, note that the error does not happen in the BDE version of the application.

These are the statements executed:

procedure TMbrshipForm.CheckForUpdates(Sender: TObject);
var
  j: Integer;
begin
  FDManager.Connections[0].StartTransaction;
  try
    with Self do
      for j := 0 to Pred(componentCount) do
      begin
        if (components[j] is TFDTable) then
          with components[j] as TFDTable do
            if canModify then
              if (State in [dsEdit, dsInsert]) then
                post;
        if not(components[j] is TFDQuery) then
          Continue;
        
        with MbrshipForm.components[j] as TFDQuery do
        begin
          if not(State in [dsEdit, dsInsert]) and not cachedUpdates or
            (State = dsInactive) then
            Continue;
          if (POSale.Drawer.AccessLevel > SALES) then
          begin
            with MbrshipForm.components[j] as TFDQuery do
              if cachedUpdates then
                CancelUpdates
              else if (State in [dsEdit, dsInsert]) then
                Cancel;
            Continue;
          end;
        end;
        
        if (Sender is TBitBtn) then
          if ((Sender as TBitBtn).name = 'undoBtn') then
          begin
            with MbrshipForm.components[j] as TFDQuery do
              if cachedUpdates then
                CancelUpdates
              else if (State in [dsEdit, dsInsert]) then
                Cancel;
            Continue;
          end;
 
        if (MbrshipForm.components[j].name = 'custQuery') then
          if (custQuery.State = dsEdit) then
          begin
            custQueryupdated_by.Value := POSale.Drawer.Cashier;
            custQueryupdated_date.Value := Date;
 
          end;
        
        if (MbrshipForm.components[j].name = 'MbrTable') then
          if (MbrTable.State = dsEdit) then
            if (custQuery.State <> dsEdit) then
            begin
              custQuery.Edit;
              custQueryupdated_by.Value := POSale.Drawer.Cashier;
              custQueryupdated_date.Value := Date;
            end;
        
        if (MbrshipForm.components[j].name = 'LegalActQuery') then
        begin
          if (LegalActQuery.State = dsEdit) then
          begin
            LegalActQuery.FieldByName('cmts').AsString := CmtMemo.Text;
          end;
        end;
        with MbrshipForm.components[j] as TFDQuery do
          if CachedUpdates then
            ApplyUpdates // if updateStatus<>usUnmodified then
 
          else if (State in [dsEdit, dsInsert]) then
            Post
      end; // for loop
 
    FDManager.Connections[0].Commit;
  except
    on E: EInfxNativeException  do
    begin
      FDManager.Connections[0].Rollback;
      Application.ShowException(E);
      POSale.Drawer.AddMessage(0, E.Message);
    end;
  end;
end;


I would appreciate if some assistance could be provided.
Thank you in advance.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Exception "Inexact character conversion during translation"  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2015 9:21 PM   in response to: Paulo Mariano in response to: Paulo Mariano
http://www-01.ibm.com/support/docview.wss?uid=swg21621347

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02