Hi
With PgSql 8.4, Lazarus 0.28, TableExists returns to me always FALSE even when the table exists.
With MySql 5, and the same code, it works fine.
I have also tried GetTableNames, but it returns only meta-table from the catalog postgres database, and no table from the currently connected database. This can explain the initial issue...
Is it known, or what could I do to make it working ?
Maybe a SELECT expression could give me the right result. I did it with MySql before I discovered the Exists function, but I'm new to pgSql and don't find the exact database and table to query with it.
Thanks for your help !
Tintinux
TableExists and PostgresSql
Moderators: gto, cipto_kh, EgonHugeist, olehs
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
hello tintinux,
would you please provide the code sample how you try to obtain the tablenames?...
I tried
It provided me the tables of the public schema. I use Lazarus 0.9.28.2-10ubuntu1 FPC 2.4.0 i386-linux-gtk 2 (beta). Zeos lib v7.
would you please provide the code sample how you try to obtain the tablenames?...
I tried
Code: Select all
ZConnection1.Connect;
ZConnection1.GetTableNames('', 'public', Memo1.Lines);
ZConnection1.Disconnect;