pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andy Shellam <andy@andycc.net>
To: pgsql-interfaces@postgresql.org
Subject: Npgsql MS 2.0 - char bug?
Date: Sun, 11 Jun 2006 12:32:50 +0100
Message-ID: <448BFF62.8030606@andycc.net> (raw)

Hi,

I'm running the MS .NET 2.0 version of Npgsql (1.0RC1) with Visual Basic
2005.

My primary key (domain_id) in the "domain" table is defined as char(10).

I have the query:

UPDATE domain SET domain = :domain, last_updated_user = CURRENT_USER,
last_updated_date = NOW() WHERE domain_id = :domain_id;

And the parameters are defined as:

:domain -> Name: "domain"
	-> Type: varchar
	-> Size: 200
	-> sourceColumn: "domain"

:domain_id -> Name: "domain_id"
	   -> Type: char
	   -> Size: 10
	   -> sourceColumn: "domain_id"

That fails with the error "the UpdateCommand affected 0 of 1 rows
expected."  The same with the DeleteCommand.

If I change the parameter ":domain_id" to...

:domain_id -> Name: "domain_id"
	   -> Type: varchar
	   -> Size: 10
	   -> sourceColumn: "domain_id"

... it works on both.

Is this a bug, or am I missing something?

Thanks

Andy



view thread (4+ messages)  latest in thread

Message-ID: <448BFF62.8030606@andycc.net>
Permalink:  ../448BFF62.8030606@andycc.net/
Also on:    postgresql.org/message-id/448BFF62.8030606@andycc.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: andy@andycc.net
  Subject: Re: Npgsql MS 2.0 - char bug?
  In-Reply-To: <448BFF62.8030606@andycc.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox