pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Benson <ken@infowerks.com>
To: pgsql-odbc@postgresql.org
Subject: UPDATE table via ODBC fails.
Date: Wed, 11 Apr 2012 15:01:36 -0700
Message-ID: <4F85FF40.5080802@infowerks.com> (raw)

I have a fairly straightforward routine which uses an ODBC connection to 
do 4 steps:

  * DROP TABLE IF EXISTS tmp_rxpurge
  * CREATE TABLE tmp_rxpurge (rxnum VARCHAR(300),dt_wrt DATE,dt_lastfill
    DATE,dt_lastact DATE, b_purge BOOLEAN)
  * INSERT INTO tmp_rxpurge (rxnum,dt_wrt,b_purge) SELECT
    "RXNUM","DATE",'f' FROM rx
  * UPDATE tmp_rxpurge as t SET dt_lastfill = rf.dt_lastfill FROM
    (SELECT "RXNUM" AS rxnum, Max("DATE") as dt_lastfill FROM
    transactions GROUP BY "RXNUM") as rf WHERE rf.rxnum=t.rxnum


The first three commands are executed perfectly as expected.
The update fails to do anything.
There is no error generated.
I have enabled 'logging' in the ODBC connector - and I don't see 
anything out of the ordinary in the short-log. (The long-log - I have no 
idea what all that stuff means.)

If I copy that last command into a psql window - it executes - and works 
fine.

But - it will not work via the ODBC connector.

What's going on?

Ken

view thread (3+ messages)  latest in thread

Message-ID: <4F85FF40.5080802@infowerks.com>
Permalink:  ../4F85FF40.5080802@infowerks.com/
Also on:    postgresql.org/message-id/4F85FF40.5080802@infowerks.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: ken@infowerks.com
  Subject: Re: UPDATE table via ODBC fails.
  In-Reply-To: <4F85FF40.5080802@infowerks.com>
  References: <4F85FF40.5080802@infowerks.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox