You must Sign In to post a response.
  • Category: ASP.NET

    How to split and load records New

    {System.Data.OracleClient.OracleException: ORA-01795: maximum number of expressions in a list is 1000


    string[] list_key = {1,2,3,.................................... 10000}
    string split = "'" + string.Join("','", list_key) + "'";

    Oracle query - select * from Tablename where column1 in (" + split+ ")";

    When I run the query which has 10000 in alist, giving out the error mentioned.

    How to split into 500 and select itthen have to load into Datatable
  • #765776
    Hi

    in your c# code using loop then every array index generate new query then finally execute them.

    Name : Dotnet Developer-2015
    Email Id : kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #765780
    Hi lily,

    Instead of storing the records in list object, my suggestion is better to store it in DataTable / DataSet, those will help you to store max records, but my request is don't get 10000 records in single select statement instead of that load the records on demand, example if you are binding these all records into gridview or some other datasource controls, then you must and should implement paging or scrolling right? that time initially load few records, after scrolling or paging load more records.

    Refer below link, to know how to implement the above task..
    http://www.dotnetspider.com/resources/46303-Load-on-demand-data-in-Gridview-using-Jquery.aspx

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/


  • Sign In to post your comments