Re: Getting user created tables from SQL - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Getting user created tables from SQL
Date
Msg-id 43438F9F.9090207@archonet.com
Whole thread Raw
In response to Getting user created tables from SQL  (Cenk KIZILDAG <cenk1536@yahoo.com>)
List pgsql-sql
Cenk KIZILDAG wrote:
> TableQuery->SQL->Add ("SELECT TABLE_NAME AS TNAME FROM
> INFORMATION_SCHEMA.TABLES WHERE (TABLE_TYPE = 'BASE TABLE')");

> CTableArr[f] = TableQuery->FieldByName ("TNAME")->AsString;

> the first Select statement work correct, counttables variable gets
> the right value but unfortunately, after the second select statement,
> in C++ Builders SQL Explorer window, it brings the correct number of
> rows but without datas in them!!! In Enterprise Manager the second
> select statement also works correct but how come it aint work in C++
> builder?

I don't suppose this could be an identifer case issue? In the first 
query TNAME will be case-folded to 'tname' (because that's how PG does 
case-insensitive identifiers).

Try looking up FieldByName("tname") and see if that comes up with anything.

--  Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: BirthDay SQL Issue
Next
From: Joost Kraaijeveld
Date:
Subject: Help with simple SQL query?