Firedac problem (Delphi XE 10.2 and Access 2000)

Asked

Viewed 209 times

0

I am using Delphi 10.2, and I am trying to display the list of tables of an Access database.

My BD path is higher than 128 characters...

Way of my comic:

pathbd := "C: basedata.......... data.mdb" (> 128 characters)

How I’m using:

var
  FDataBase  : TFDConnection;
begin  
  FDataBase :=  TFDConnection.Create(nil);  
  try        
    FDataBase.DriverName := 'MSACC';    
    FDataBase.Params.Add('Database='+pathbd);
    FDataBase.Params.Add('LoginPrompt=False');
    FDataBase.Params.Add('OpenMode=ReadWrite');    
    FDataBase.GetTableNames('', '', '', Memo.Lines);
  finally   
    FDataBase.free; 
  end;
end;

Error that is returned:

"Raised Exception class Efdexception with message '[Firedac][Dats]-32. Variable length column [CATALOG_NAME] overflow. Value length - [188], column Maximum length - [128]'.

How can I get around this problem?

  • 1

    Sorry for the obvious option, but is there a possibility to change the directory of the bank? or abbreviate the nomenclature, making the address smaller?

  • Thank you for your intervention. The problem is this, the user has the freedom to put the database without limitations.

1 answer

-1

I know it’s an old question, but I found a simple solution. Usage Delphi 10.3 In my case the problem was on a property of the Fdmongoquery In the Formatoptions session set the Strstrim2len parameter to true and no more exceptions in the application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.