473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ADO.NET: named parameter or unnamed, use ? or @, even % [ ]

Does ADO.NET unified the way to use parameters in sql query string?

No matter what database server or driver are being used, can ADO.NET layer
supports so called named or unnamed parameters? And defines fixed parameter
marker character? Does ANSI SQL define rules for parameter marker?

That way, maybe easier to develop application works with most database
server.

Thanks,
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Ryan Liu
Shanghai Fengpu Software Co. Ltd
Shanghai , China

http://www.PowerCATI.com Powerful CATI!
http://www.fpsoft.net.cn
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Jan 12 '08 #1
3 4780
I suspect it is down to the specific provider to care about the
structure. For instance, IIRC, the SqlClient provider *only* supports
named parameters (not 100% sure, but just seem to recall...)

Marc
Jan 12 '08 #2
Ryan Liu wrote:
Does ADO.NET unified the way to use parameters in sql query string?

No matter what database server or driver are being used, can ADO.NET
layer supports so called named or unnamed parameters? And defines fixed
parameter marker character? Does ANSI SQL define rules for parameter
marker?
4 x No

You will have to parameterize that yourself (it is not that difficult).

Arne

Jan 12 '08 #3
Un addition to the other answers, you might want to look at the data
access enterprise block. The Database class has a property on it that
indicates what the parameter marker is for a particular database provider.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ryan Liu" <rl**@PowerCATI.comwrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
Does ADO.NET unified the way to use parameters in sql query string?

No matter what database server or driver are being used, can ADO.NET layer
supports so called named or unnamed parameters? And defines fixed
parameter marker character? Does ANSI SQL define rules for parameter
marker?

That way, maybe easier to develop application works with most database
server.

Thanks,
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

Ryan Liu
Shanghai Fengpu Software Co. Ltd
Shanghai , China

http://www.PowerCATI.com Powerful CATI!
http://www.fpsoft.net.cn
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
Jan 12 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mysooru | last post by:
Hi All, One of the ATL class..... template <class Base> class CComObject : public Base { public: typedef Base _BaseClass;
3
by: Sandy | last post by:
Hi, I have two files as folllows file1.cpp #include<iostream> using namespace std; namespace { void show(); void fun() { cout<<"fun called\n"; } }
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
0
by: Billie Boy | last post by:
Hi to all. I’m new here and am coming to you from Melbourne Australia. So a big HELLO 2 ALL. Now I am encountering an annoying problem in the SQL builder of the copy of VB.6 that I am using at...
37
by: Bill Pursell | last post by:
I really like having the ability to specify parameter names when I call a function, and I've been tempted to do things like the following: foo ( (struct foo_args){.area = 5, .base=4}); but...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
2
by: Prathap | last post by:
Hi, I am a newbie to c++ and I am looking for examples in using pipes for IPC communication. My two processes are independent and they cannot use a unnamed pipe, so I am looking for examples that...
3
by: CrazyJohn | last post by:
Hi guys, This is my first time posting question here, if I break any rules, please kindly point out. And I'm really glad to be a part of this community. Here is my question, Our lecturer...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.