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 4608920
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:54:47+00:00 2026-05-22T00:54:47+00:00

Using the oledb provider. Query is something like this: SELECT appid FROM table WHERE

  • 0

Using the oledb provider. Query is something like this:

SELECT appid 
  FROM table 
 WHERE response_id IN (?)

I take an int array and send it to a method that adds a comma delimiter between the array values, and returns a string. This string is then sent as the parameter.

This works fine if I have one value to pass through, but when I send two values I get the ORA-01722 error.

I’ve tried looking at the v_$sql table to see what’s being executed, but it’s not showing queries executed by my page. I can only see things I executed via toad, even though I’m using the same login in both cases. Not sure if there are other tables that store sql data.

The string builder is below.

public string intArrayToString(int[] array)
{
    if (array != null)
    {
        string delimiter = ",";

        if (array.Length > 0)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append(array[0]);
            for (int i = 1; i < array.Length; i++)
            {
                builder.Append(delimiter);
                builder.Append(array[i]);
            }                    
            return builder.ToString();
        }
        else
        {
            return string.Empty;
        }
    }
    else
    {
        return null;
    }
}
  • 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-22T00:54:48+00:00Added an answer on May 22, 2026 at 12:54 am

    You cannot just put a comma-separated string as the IN value unfortunately. What you can do is automatically generating a bind variable for each of the array elements and binding each value, like so:

    select appid from table where response_id in (:id1, :id2, :id3)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With SQL Server 2005 using SSMS, when I run this: SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel
I'm trying to read from excel file with oleDB provider using C#: using (var
I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop,
In my C# application I am using the Microsoft Jet OLEDB data provider to
Working with an Oracle 9i database from an ASP.NET 2.0 (VB) application using OLEDB.
hi im trying to get a dataset from an access database im using this
I am using OLEDB to Update data in .dbf database from c#. I get
I need to open foxpro free tables in vb.net using the oledb connection. But...
When trying to enter a SQL query with parameters using the Oracle OLE DB
So I have learned that that the Microsoft.Jet.OLEDB.4.0 data provider for querying data sources

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.