From: | "lothar(dot)behrens(at)lollisoft(dot)de" <lothar(dot)behrens(at)lollisoft(dot)de> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: SQLSetPos problem ? |
Date: | 2006-12-12 20:25:53 |
Message-ID: | 1165955153.386694.185060@f1g2000cwa.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:
> > Hiroshi Inoue schrieb:
> >
> >> lothar(dot)behrens(at)lollisoft(dot)de wrote:
> >>> Hi,
> >>>
> >>> I am using unixodbc in the latest version and psqlodbc 07.03.0200.
> >>> Having many queries working
> >>> good in my application one gives me this error, when updating a row.
> >> The version 7.3.0200 is pretty old.
> >> Please try the 8.2.xxxx version.
> >>
> >
> > I need cursor functionality like first,back,next,last. Does the latest
> > driver support it ?
>
> Yes at least on Windows.
Currently I have figured out, that my SQL_ADD statement fails
(SQLSetPos).
It seems, that I cannot insert new rows, because of foreign key
constraints.
Removing the NOT NULL clauses of that columns didn't helped.
With PGAdmin I was able to test inserting such a row. That worked.
Any ideas ?
If the bound columns having the wrong value - such as a non exsisting
foreign key -
how must it be filled to indicate a NULL value ?
I bind such a column that way:
buffer = malloc((ColumnSize+1)*rows);
memset(buffer, 0, (ColumnSize+1)*rows);
ret = SQLBindCol(hstmt, column, SQL_C_CHAR, buffer, (ColumnSize+1),
&cbBufferLength);
Is that wrong ?
Regardless, I will also try the newest psqlODBC driver and also create
a sample
console app to insert into the same table. The GUI application is too
complex.
Lothar
The logfile reports this error:
[SQLError]**** PGAPI_Error: henv=0, hdbc=0 hstmt=170046048
**** PGAPI_StmtError: hstmt=170046048 <512>
SC_get_error: status = 7, msg = #Error while executing the query;
FEHLER: Einfgen oder Aktualisieren in Tabelle user_anwendungen
verletzt Fremdschlssel-Constraint cst_user_anwendungen_userid#
szSqlState = 'HY000',len=170, szError='Error while
executing the query;
FEHLER: Einfgen oder Aktualisieren in Tabelle user_anwendungen
verletzt Fremdschlssel-Constraint cst_user_anwendungen_userid'
**** PGAPI_Error exit code=0
[SQLError]**** PGAPI_Error: henv=0, hdbc=0 hstmt=170046048
**** PGAPI_StmtError: hstmt=170046048 <512>
SC_Get_error returned nothing.
Thanks, Lothar
>
> regards,
> Hiroshi Inoue
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | noreply | 2006-12-12 23:50:23 | [ psqlodbc-Bugs-1000836 ] invalid byte sequence for encoding "UTF8": 0x92 |
Previous Message | Caio Begotti | 2006-12-12 17:30:20 | Re: possible odbc driver bug with postgresql-7.4 |