Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: [INTERFACES] Odbc parser error

From: "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org>
To: Byron Nikolaidis <byronn(at)insightdist(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [INTERFACES] Odbc parser error
Date: 1998-09-17 23:37:22
Message-ID: 199809172337.TAA25897@bgalli.mug.org (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
Byron Nikolaidis <byronn(at)insightdist(dot)com> wrote:

> Sferacarta Software wrote:
> 
> > Hi all,
> >
> > Seems that ODBC driver have some problems while it translate Access
> > commands.
> > I created a form with a subform joined by two columns.
		[...]
> > NB: Note that parser translate ("progressivo" =  NULL) instead of
> > ("progressivo" IS NULL).
> >
> >
> 
> Yes, the NULL works for parameters of an update statement, where Access would
> specify a statement such as "update table set param = ? where x = 1".  But
> it doesn't work in a select statement.  I don't think I have much to work
> with here.  The statement comes in as something like "select * from table
> where x = ?".  I have to replace the ? with something.  On updates, 'NULL'
> works fine.
> 
> I'm not sure what to do about this.  On other dbms, parameter passing is
> handled through a separate protocol to the backend, usually after a prepare
> statement, so on these its no problem to send a null, or large amounts of
> ascii/binary data, without having to worry about direct substitution into
> the sql string or hitting the upper limit of the statement string.  I think
> until Postgres has such as protocol for parameter substitution/passing, it
> will be difficult to fix this problem.
> 
> Any suggestions?
> 
> Byron

How about subsitution any occurance of /=[ \t]*?/ with "IS NULL".  This should
work for both select and update statements.
--
____       | Billy G. Allie    | Domain....: Bill(dot)Allie(at)mug(dot)org
|  /|      | 7436 Hartwell     | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie(at)email(dot)msn(dot)com
|/  |LLIE  | (313) 582-1540    | 

Responses

pgsql-hackers by date

Next:From: Christopher OliverDate: 1998-09-18 03:28:09
Subject: oid8types() borken?
Previous:From: Byron NikolaidisDate: 1998-09-17 20:33:31
Subject: Re: [INTERFACES] Odbc parser error

pgsql-interfaces by date

Next:From: Constantin TeodorescuDate: 1998-09-18 11:22:47
Subject: New PgAccess version 0.89 - minor changes
Previous:From: Ken J. WrightDate: 1998-09-17 22:52:27
Subject: psql buffer exceeded

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group