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

Npgsql MS 2.0 - char bug?

From: Andy Shellam <andy(at)andycc(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Npgsql MS 2.0 - char bug?
Date: 2006-06-11 11:32:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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

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?




pgsql-interfaces by date

Next:From: Jim ButtafuocoDate: 2006-06-11 12:15:35
Subject: Re: Npgsql MS 2.0 - char bug?
Previous:From: Mark Morgan LloydDate: 2006-06-10 11:21:34
Subject: Re: Building psql.exe using the free Borland compiler

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