Default values

Report PGNP bugs.

Default values

Postby karpiv » Fri Dec 04, 2009 6:32 am

I have table T1 with columns C1,C2,C3.
Column C1 does not allow null values and has default value (next_val from sequence)

when i try to execute statement like "insert into T1(C2,C3) values (val1,val2)
I get the error:
OLE DB provider "PGNP" for linked server "testPGNP" returned message "ERROR: null value in column "C1" violates not-null constraint
".
Msg 7343, Level 16, State 2, Line 1
The OLE DB provider "PGNP" for linked server "testPGNP" could not INSERT INTO table "[testPGNP].[testPGNP].[public].[T1]".
karpiv
 
Posts: 6
Joined: Wed Dec 02, 2009 7:24 am

Re: Default values

Postby Moderator » Sun Dec 06, 2009 9:55 pm

We are working on the fix. Thank you!
User avatar
Moderator
Site Admin
 
Posts: 302
Joined: Wed Oct 29, 2008 11:27 pm

Re: Default values

Postby gravityfreak99 » Tue Jun 08, 2010 10:10 am

Has this issue been resolved? At first glance, my problem seems to be similar. I am attempting to insert a row into a table that has a serial column, named "identity", using a subclass of CTable. I set the status of the accessor's identity value as DBSTATUS_S_DEFAULT (I also tried DBSTATUS_S_IGNORE), yet my insert still returns E_FAIL and PGNProfiler reports:

ERROR: null value in column "identity" violates not-null constraint

I'm using Visual C++ in Visual Studio 2010, the trial version of PGNP v1.3.0.2154, and PostgreSQL 8.4 on a Windows XP platform.

Thanks,
Rick Presley
gravityfreak99
 
Posts: 1
Joined: Tue Jun 08, 2010 9:57 am

Re: Default values

Postby Moderator » Wed Jun 09, 2010 10:59 pm

Yes, this bug was fixed a while ago, but for some reason it did not make into 2154.

Here is new trial build with the fix: http://www.pgoledb.com/downloads/PGNP-1.3.0.2158.exe

Please let us know if it worked.
User avatar
Moderator
Site Admin
 
Posts: 302
Joined: Wed Oct 29, 2008 11:27 pm


Return to Report Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron