Skip site navigation (1) Skip section navigation (2)

BUG #4652: .net upate

From: "carl baptista" <carl(at)multimax(dot)co(dot)za>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4652: .net upate
Date: 2009-02-13 12:30:48
Message-ID: 200902131230.n1DCUmgP086155@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4652
Logged by:          carl baptista
Email address:      carl(at)multimax(dot)co(dot)za
PostgreSQL version: 8.3
Operating system:   win xp
Description:        .net upate
Details: 

hi, 

I have included the Npgsql dll in my c# webservice.

I am trying to update a table via a dataset, using the following code:

NpgsqlDataAdapter L_Adapter = new NpgsqlDataAdapter(Qry, L_Conn);
try
{                        
L_Adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
NpgsqlCommandBuilder L_CmndBuilder = new NpgsqlCommandBuilder(L_Adapter);
return L_Adapter.Update(inDataTable);
}
finally
{
L_Conn.Close();
L_Conn.Dispose();
}

when I use this code to perform an update, it returns a count indicating
that it was successful, but when the data is scrutinised, it turns out that
the update failed. When I perform a delete using this code, I get the
following error: 

Concurrency violation: the DeleteCommand affected 0 of the expected 1
records.

Please could you show mw what I'm doing wrong here, or where I could get a
patch to fix this if it is a bug.

Thanks
Carl

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2009-02-13 14:41:08
Subject: Re: BUG #4651: Postgresql connection error with PHP 5.
Previous:From: NitinDate: 2009-02-13 11:29:18
Subject: BUG #4651: Postgresql connection error with PHP 5.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group