Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Colums list
Mon, Jul 1 2013 9:27 AMPermanent Link

Enrico Lago

Hi. Is there a sql query that can returns the columns list of a table?
Mon, Jul 1 2013 11:12 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Enrico


Not as far as I know (knowledge limited to V4.25). DBISAM stores the table definitions in the table header so they're not accessible through SQL. ElevateDB was designed to use a catalog and because of that you can use SQL to get the table definitions, but with DBISAM you have to use Delphi..

Roy Lambert [Team Elevate]
Tue, Jul 2 2013 1:15 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Enrico,

<< Hi. Is there a sql query that can returns the columns list of a table? >>

Only in the DBISAM ODBC Driver.  With straight Delphi/C++Builder, you have
to use programmatic methods to do so.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jul 2 2013 5:28 PMPermanent Link

Jeff Cook

Aspect Systems Ltd

Avatar



<Enrico Lago> wrote in message
news:030D4C52-D5FB-4070-8C10-E1BF82CA74A8@news.elevatesoft.com...
> Hi. Is there a sql query that can returns the columns list of a table?
>

Hi Enrico

Using a query and very simple Delphi code:-

========================
with qryFields do
   begin
     SQL.Text := 'SELECT * FROM ' + TableName;
     Open;
     for i := 0 to Fields.Count - 1 do sl.Add(Fields[i].FieldName); //sl is
a TStringList
     Close;
   end;
========================

Cheers

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz

Image