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

Manuel de la Pena mandel at themacaque.com
Thu Apr 3 05:55:43 EDT 2008


Hi Francisco,


The fact of having to use '@ or ':' does not really bother me and I have already changed the parameter names in my code. I have added the feature request since it will make it easier to port code that was using Oracle to use PostgreSQL although I understand it is not an important one. 

Thanks for the quick replay,

Manuel

-----Mensaje original-----
De: francisco.figueiredo.jr at gmail.com [mailto:francisco.figueiredo.jr at gmail.com] En nombre de Francisco Figueiredo Jr.
Enviado el: 03 April 2008 03:15
Para: Manuel de la Pena
CC: Mono-devel; Mono-list
Asunto: Re: [Mono-list] Npsql parameter with leading '?'

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?
http://pgfoundry.org/tracker/?group_id=1000140

Thanks in advance.

>
>
>  Cheers for you great work,
>

And thank you for your interest in Npgsql!


-- 
Regards,

Francisco Figueiredo Jr.
fxjr.blogspot.com
www.npgsql.org



More information about the Mono-list mailing list