PgSqlLoader Insert, SetValue, AutoIncrement PK field

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
stephen.Cognito
Posts: 10
Joined: Mon 18 Jan 2010 10:48
Location: Devon, UK

PgSqlLoader Insert, SetValue, AutoIncrement PK field

Post by stephen.Cognito » Thu 11 Aug 2011 14:41

Hi

I am using PgSqlLoader to Insert records into a table on a remote server.
The table we are writing to has an AutoIncrement field as its PK. We are using pgLoader.SetValue("FieldName", value) on all other fields to set its value and expecting the auto increment field to increment and update automatically. We can manually set the auto increment field in the code as above but this defeats the object.
On calling pgLoader.NextRow(); and then pgLoader.Close(); raises an exception null value in column "OIDIdcCount" violates not-null constraint

The table field in the schema is setup as "OIDIdcCount" serial NOT NULL
with the default value/sequence set to
nextval('"TblIdcCount_OIDIdcCount_seq"'::regclass)

Any ideas?

Many thanks in advance for your help
Stephen

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 15 Aug 2011 11:31

Thank you for your report. We have reproduced the mentioned behaviour. We will investigate it and notify you about the results as soon as possible.

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 01 Sep 2011 10:07

The bug with serial columns when working with PgSqlLoader is fixed. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.

Shalex
Site Admin
Posts: 8241
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Sep 2011 11:57

New version of dotConnect for PostgreSQL 5.50 is released!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21944 .

stephen.Cognito
Posts: 10
Joined: Mon 18 Jan 2010 10:48
Location: Devon, UK

Post by stephen.Cognito » Wed 07 Sep 2011 15:30

Many thanks, got the update and working perfectly!

Thanks again
Stephen

Post Reply