Re: parameter names in Sql Server
From: Jerry Pisk (jerryiii_at_hotmail.com)
Date: 06/13/04
- Previous message: jakez: "Re: parameter names in Sql Server"
- In reply to: jakez: "Re: parameter names in Sql Server"
- Next in thread: jzajac: "Re: parameter names in Sql Server"
- Reply: jzajac: "Re: parameter names in Sql Server"
- Reply: jzajac_at_fnis.com: "Re: parameter names in Sql Server"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 13 Jun 2004 00:47:12 -0700
If you stick to the OLEDB provider (System.Data.OleDb namespace) you can use
the same classes and ? as parameter placeholders for both Sql Server and
Oracle.
Jerry
"jakez" <jakez@discussions.microsoft.com> wrote in message
news:C47BDD70-F4AA-48CD-A0CE-AD1EA599A198@microsoft.com...
> Thanks Bill, that's what I was afraid of. Unfortunately, I am using
> ADO.NET and am trying to find a way that will allow me to write a single
> query that can be used with both SQL Server and Oracle. I guess I will
> have just have to do some parsing in my custom code before the queries are
> executed to make any necessary changes. Thanks again for your reply.
>
>
>
>
> "William (Bill) Vaughn" wrote:
>
>> No, the parameter markers are set by the data provider and can't be
>> changed.
>> However, when using OLE DB and ADO classic (not ADO.NET), parameters are
>> marked with "?" in the query and the name is irrelevant. All named
>> parameter
>> implementations use the @ character to prefix parameters.
>>
>> hth
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>>
>> "jakez" <jakez@discussions.microsoft.com> wrote in message
>> news:30CD7FB5-67E7-48CD-8003-4461B6636037@microsoft.com...
>> > Is there any other naming convention that can be used for parameters in
>> SqlServer besides the @<paramName> method? Like, possibly another
>> special
>> character or something like this... Thanks in advance for any
>> information.
>>
>>
>>
- Previous message: jakez: "Re: parameter names in Sql Server"
- In reply to: jakez: "Re: parameter names in Sql Server"
- Next in thread: jzajac: "Re: parameter names in Sql Server"
- Reply: jzajac: "Re: parameter names in Sql Server"
- Reply: jzajac_at_fnis.com: "Re: parameter names in Sql Server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|