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

Re: Serial columns and ADO

From: "Dmitry Samokhin" <sdld(at)mail(dot)ru>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Serial columns and ADO
Date: 2006-11-17 08:22:56
Message-ID: ejjrgl$2bjg$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-odbc
> OK try the snapshot dll.
> 0x2 Extra Opts option is no longer needed for the case.

>
> regards,
> Hiroshi Inoue

OK, 'SELECT 0' has been swept out.

> Also changed to SELECT NULL in case of failure.
What failure do you mean?

But there's still another problem. Let our table 't1' be initially empty and 
the sequence reset to 1. Consider the following ADO operations:

  rs.AddNew
  rs("col2") = "Sample string"
  rs.Update
  MsgBox rs("col1")

  rs.AddNew
  rs("col1") = 2
  rs("col2") = "Sample string"
  rs.Update
  MsgBox rs("col1")

Look, the second insert operation sets the identity field explicitly. But 
the driver still lets 'SELECT currval...' to pass. As a result, my explicit 
value '2' is replaced by the currval()=1. Such distortion should be avoided 
anyway.

Dmitry. 



In response to

Responses

pgsql-odbc by date

Next:From: Dmitriy IvanovDate: 2006-11-17 17:22:34
Subject: Re: Serial columns and ADO
Previous:From: Jim NasbyDate: 2006-11-17 01:52:49
Subject: Re: Postgres 7.4 to Oracle 10g Migration with BLOBs

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