[Mono-dev] [Mono-list] Npsql parameter with leading '?'

Francisco Figueiredo Jr. francisco at npgsql.org
Wed Apr 2 22:15:27 EDT 2008

On Wed, Apr 2, 2008 at 8:05 PM, Manuel de la Pena <mandel at themacaque.com> wrote:
> Hi guys,

Hi, Manuel!

>  I have been doing some work with IDataParameters and IDbCommands using
>  the Npsql ADO connector. I've noticed that the Npsql adds a ':' infront
>  of my parameters name which I have named as '?' + 'parameter_name'.

Yes. Npgsql had a bug which is already fixed where it prefixed parameter name.

>  I have used the '?' as it is done with the OracleClient, is this the
>  correct behaviour/approach?
>  I have checked the code and Npsql does accept '@' and ':' as the leading
>  chars of the named parameters. Should '?' also be accepted? I'm sure I
>  am not the only one that has made this error.

Npgsql only accepts @ and : as prefix for parameter placeholders.
There is no work done to support ? as parameter placeholders.

Is this a big issue for you?

I think we can add support for this type of commandtext. At first
Npgsql only supported : prefix. Later we added @ support because it
would easy people migrating from SQLServer. Now, if it would easy
migration from Oracle, of course we have to do something about it! :)

Manuel, can you fill a feature request on our project tracker?

Thanks in advance.

>  Cheers for you great work,

And thank you for your interest in Npgsql!


Francisco Figueiredo Jr.

More information about the Mono-devel-list mailing list