Recent

Author Topic: GetTableNames syntax ?  (Read 13744 times)

kuma

  • New member
  • *
  • Posts: 9
GetTableNames syntax ?
« on: August 17, 2006, 09:17:04 am »
Someone knows what different of the GetTableNames whit Delphi and Lazarus.

I use the component of Zeos-6.5.1_alpha.TZConnection and the procedure GetTableNames to get Firebird table structure.

But I found this procedure have some different with Delphi.ADOConnection.

The Zeos-6.5.1_alpha.TZConnection.GetTableNames syntax is ..

GetTableNames(const pattern:string; List:TStrings;)

Who can explain what is the pattern or who can give some documents for reference.

Thanks and please don't concerned my english too bad.

JanH

  • Guest
RE: GetTableNames syntax ?
« Reply #1 on: August 17, 2006, 12:51:46 pm »
in the past I used this function in delphi. if I remind right, you can call
Code: [Select]
GetTableNames( 'a*', sl )
to get all tables starting with 'a'.

kuma

  • New member
  • *
  • Posts: 9
GetTableNames syntax ?
« Reply #2 on: August 18, 2006, 08:45:14 am »
I Tried by your example. But it didn't worked by my think. Nevertheless the procedure retuen all tables name.

My function is ..

procedure TFDelNull.GetDataBaseStructure;
var I : Integer;
begin
  ListBox1.Clear;
  ZConnection1.GetTableNames('A*', ListBox1.Items);
  for I := 0 to ListBox1.Items.Count-1 do
      begin
      TIComboBox1.Items.Add(Trim(Trim(ListBox1.Items)));
      end;
end;    

The Zeos-6.5.1_alpha.TZConnection.GetTableNames syntax is ..
GetTableNames(const pattern:string; List:TStrings);
   
The ADOConnection1.GetTableNames syntax is ..
GetTableNames(List:TStrings; SystemTables:Boolean=False);

I think both is different.

JanH

  • Guest
GetTableNames syntax ?
« Reply #3 on: August 22, 2006, 01:01:50 pm »
ADO and Zeos are two different packages. So why the syntax have to be the same? It's mere chance that the functions has the same name - I think. The zeos-function returns table names like a pattern, and the ADO-function returns either system-tables or user-tables.

What is your problem?

Tip: one trim() is the same as trim(trim()) ;-)

 

TinyPortal © 2005-2018