Re: Still SQLSetPos problem even with minimal sample, SQL_NULL_DATA

From: "lothar(dot)behrens(at)lollisoft(dot)de" <lothar(dot)behrens(at)lollisoft(dot)de>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Still SQLSetPos problem even with minimal sample, SQL_NULL_DATA
Date: 2006-12-19 07:38:43
Message-ID: 1166513923.246513.71300@73g2000cwn.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


Hiroshi Inoue schrieb:

> lothar(dot)behrens(at)lollisoft(dot)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.
>

Ahh,

I misunderstood you. I will try that today.

regards,

Lothar

> regards,
> Hiroshi Inoue
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message noreply 2006-12-21 09:43:15 [ psqlodbc-Bugs-1000968 ] Unicode driver does not work with multibyte database name
Previous Message noreply 2006-12-19 04:42:08 [ psqlodbc-Bugs-1000836 ] invalid byte sequence for encoding &amp; amp; quot; UTF8&amp; amp; quot; : 0x92