From: Hiroshi Inoue <inoue@tpf.co.jp>
To: lothar.behrens@lollisoft.de <lothar.behrens@lollisoft.de>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Still SQLSetPos problem even with minimal sample, SQL_NULL_DATA
Date: Tue, 19 Dec 2006 08:40:30 +0900
Message-ID: <458726EE.6040906@tpf.co.jp> (raw)
In-Reply-To: <1166482424.555811.255330@j72g2000cwa.googlegroups.com>
References: <1165751917.708138.93120@j72g2000cwa.googlegroups.com>
<457CACE1.2090907@tpf.co.jp>
<1165848049.639913.7360@n67g2000cwd.googlegroups.com>
<457DF1D9.7080804@tpf.co.jp>
<1165955153.386694.185060@f1g2000cwa.googlegroups.com>
<457F4E43.108@tpf.co.jp>
<1166311419.967140.317720@16g2000cwy.googlegroups.com>
<1166482424.555811.255330@j72g2000cwa.googlegroups.com>
lothar.behrens@lollisoft.de wrote:
> Hi,
>
> I have implemented setting SQL_COLUMN_IGNORE, SQL_NULL_DATA and have
> added functions
> to indicate this state.
>
> I have made a 'small' sample application to demonstrate this, but I
> still use my ODBC wrapper
> classes in that sample application. You may get access to the full
> code. Ask for it!
>
> The first insert is with valid foreign keys and no column set to NULL.
> This insert works.
> My next insert has set the columns to NULL, but it inserts the values
> of the last insert.
<snip>
> Currently I have made an array of long (cbBufferLength[2]) and set this
> explicitely short before
> the call to SQLSetPos:
>
> if (mode == 1) // 1 means adding
> cbBufferLength[1] = SQL_NULL_DATA+SQL_COLUMN_IGNORE;
> else
> cbBufferLength[0] = SQL_NULL_DATA+SQL_COLUMN_IGNORE;
At first glance, adding SQL_NULL_DATA(=-1) and SQL_COLUMN_IGNORE(=-6)
seems to have no meaning.
If you really want to set to NULL on SQL_ADD, please set SQL_NULL_DATA.
If you want to set DEFAULT on SQL_ADD, please set SQL_COLUMN_IGNORE.
regards,
Hiroshi Inoue
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: inoue@tpf.co.jp, lothar.behrens@lollisoft.de
Subject: Re: Still SQLSetPos problem even with minimal sample, SQL_NULL_DATA
In-Reply-To: <458726EE.6040906@tpf.co.jp>
References: <1165751917.708138.93120@j72g2000cwa.googlegroups.com> <457CACE1.2090907@tpf.co.jp> <1165848049.639913.7360@n67g2000cwd.googlegroups.com> <457DF1D9.7080804@tpf.co.jp> <1165955153.386694.185060@f1g2000cwa.googlegroups.com> <457F4E43.108@tpf.co.jp> <1166311419.967140.317720@16g2000cwy.googlegroups.com> <1166482424.555811.255330@j72g2000cwa.googlegroups.com> <458726EE.6040906@tpf.co.jp>
* 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