Uniconnection.GetTableNames

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
isysoftware
Posts: 44
Joined: Wed 14 Nov 2012 17:33

Uniconnection.GetTableNames

Post by isysoftware » Fri 23 Nov 2012 11:28

Hi All,

with this code, (radstudio 2007, Unidac 4.5.9), I have an Abstract Error on line UniConnection1.GetTableNames(alst);

Code: Select all

function TForm1.LeggiTabelle: boolean;
var aLst:TWideStrings;
begin
      if(UniConnection1.Connected = true) then
          begin
              aLst:=TWideStrings.Create;
              //aLst.Clear;
              UniConnection1.GetTableNames(alst);
              if(Assigned(aLst)) then
                 begin
                      if(aLst.Count > 0) then
                          showmessage('OK')
                      else
                         ShowMessage('KO');
                 end;
          end
      else
         result:=false;
end;
Can you help me?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Uniconnection.GetTableNames

Post by AlexP » Fri 23 Nov 2012 13:11

Hello,

The TWideStrings class includes Clear, Insert, Delete abstract methods (corresponding messages are displayed when compiling), and when calling one of these methods (Clear particularly), you get this error. To solve the problem, you should modify your code in the following way:

aLst:= TWideStringList.Create;

Post Reply