Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6971577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:51:29+00:00 2026-05-27T16:51:29+00:00

I have C# application we’ve been coding in ADO.NET. I’ve been using the IDbCommand

  • 0

I have C# application we’ve been coding in ADO.NET. I’ve been using the IDbCommand, and IDbConnection interfaces to create cross-database code.

It’s all worked wonderfully so far (across Firebird, SQLite, SQL Server 2005, and 2008, Access 2007, and Access 2010, and Oracle 11g).

Problem I have, is I now have an Oracle 10g database I need to support.

All the “normal” stuff, creating connections, and commands works fine, however, when I go to create a parameter using the interface IDataParameter and cmd.CreateParamater() fails on 10g, because of parameter syntax in the query (I’m using parameterized queries).

Apparently, Oracle 10g, out of the box, doesn’t support using the @ sign. Oracle 11g, SQL Server, and all the others mentioned do.

For instance, the following query will fail in 10g:

select * from Products where ProductId = @ProductId

But, if I use the colon, it succeeds just fine, using the above mentioned ado.net interfaces, so this query will succeed:

select * from Products where ProductId = :ProductId

Unfortunately, the colon doesn’t work in most of the other database implementations.

Or is there an option that can be flipped in the Oracle 10g Database that allows for @ delimiter to be used in place of the : delimiter for parameters.

The current solution I have is less than ideal, I have the customer/client initializing the property ParameterDelimiter (that I default to the @ sign), and use a string.Format, to insert the ParameterDelimiter.

Is there any standard way of doing this that I’m missing, without having the customer have to pass me a delimiter, or without having my base libraries know about the database implementation? (For instance, including ODP.NET and checking against an OracleConnection)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:51:29+00:00Added an answer on May 27, 2026 at 4:51 pm

    For what it’s worth, I did find this post:

    Which parameter marker should I use? ADO.NET 2.0, Sql Server @, Oracle : (link is dead)

    mentioned in this question:

    Get the parameter prefix in ADO.NET

    With the following code ‘asking’ the connection object for the information:

    string format = connection
      .GetSchema("DataSourceInformation")
      .Rows[0]["ParameterMarkerFormat"]
      .ToString();
    

    So that should be the ‘standard way of doing this’, also without having the customer pass the information and without having to know about the database implementation.

    Edit: it must be added that System.Data.SqlClient.SqlConnection apparently returns {0} instead of @{0}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application like where i can create dynamic tabs. and delete cross bar
I have application building using third party apis, j2me apis,application code distributed in various
We have application have been written in Silverlight using MVVM pattern. We need to
I have application code that inserts a record in a local database and a
I have application that works using Perl's CGI::Fast . Basically mainloop of the code
I have application with this code: Module Startup <STAThread()> _ Public Sub Main() Try
I have application written in Java that is using EJB3 + Toplink. I'm using
I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This
I have application that use mysql database, but now i need to port it
I have application in which i have create tab-bar dynamically. Now i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.