SQLExpress - Xb2.NET     ot4xb  
   Announcement      Free XUG Meeting Toronto/Canada (May 25, 2008)       [ More Info ... ]
sqlexpress
Error on Postgresql
Thread Starter: Osvaldo Ramirez Started: 4/16/2008 5:03 AM UTC
Replies: 2
Error on Postgresql
Hello guys

This code run fine using MySQL
  oTotRecnos := SQLDataSet():new( "select cli_id from +cQuote+"CLIENTE"+cQuote+";" )

  nTotRecnos := oTotRecnos:reccount()
  oTotRecnos:destroy()

But, In PostgreSQL not, it show this error :

.= SQL ERROR ===========
Date: 20080415 22:57:11
C:\develop\DistSQL\SYSTEM01.EXE, Thread: 3
Windows Vista 06.00 Build 06000, SQLXpp: 3.1.24, Runtime: 1.90.331
SQLState: 42703,  ErrorCode:7
ERROR: column "cli_id" does not exist;
Error while executing the query

So, if I change this

  oTotRecnos := SQLDataSet():new( "select * from +cQuote+"CLIENTE"+cQuote+";" )

  nTotRecnos := oTotRecnos:reccount()
  oTotRecnos:destroy()

It run fine on Postgresql

I am testing using PostgreSQL 8.3

Some one know why ?

Thanks in advance
Osvaldo Ramirez
Re: Error on Postgresql
Osvaldo Ramirez <ramirezosvaldo@yahoo.com> wrote in news:5e641473$2f18c52c
$790d@news.xbwin.com:

This code run fine using MySQL
  oTotRecnos := SQLDataSet():new( "select cli_id from +cQuote+"CLIENTE"+cQuote+";" )
  nTotRecnos := oTotRecnos:reccount()
  oTotRecnos:destroy()
But, In PostgreSQL not, it show this error :
.= SQL ERROR ===========
Date: 20080415 22:57:11
C:\develop\DistSQL\SYSTEM01.EXE, Thread: 3
Windows Vista 06.00 Build 06000, SQLXpp: 3.1.24, Runtime: 1.90.331
SQLState: 42703,  ErrorCode:7
ERROR: column "cli_id" does not exist;

Obviously the "cli_id" field does not exist (at least not in lower case).

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools
Re: Error on Postgresql
Thanks Boris Borzic

Well is it obvious, but the field exist, so neither cli_id nor CLI_ID work.

I attach the picture showing a cliente table browse

Anyway I will try to find  why.

Best Regards
Osvaldo Ramirez




Osvaldo Ramirez <ramirezosvaldo@yahoo.com> wrote in news:5e641473$2f18c52c
$790d@news.xbwin.com:
This code run fine using MySQL
>    oTotRecnos := SQLDataSet():new( "select cli_id from > +cQuote+"CLIENTE"+cQuote+";" )
>
>    nTotRecnos := oTotRecnos:reccount()
>    oTotRecnos:destroy()
>
> But, In PostgreSQL not, it show this error :
>
> .= SQL ERROR ===========
> Date: 20080415 22:57:11
> C:\develop\DistSQL\SYSTEM01.EXE, Thread: 3
> Windows Vista 06.00 Build 06000, SQLXpp: 3.1.24, Runtime: 1.90.331
> SQLState: 42703,  ErrorCode:7
> ERROR: column "cli_id" does not exist;
Obviously the "cli_id" field does not exist (at least not in lower case).
Best regards,
Boris Borzic

This message includes the following attachments: