Note that there are some explanatory texts on larger screens.

plurals
  1. POScrollable ODBC cursor in C#
    primarykey
    data
    text
    <p>I'm a C++ programmer and I'm not familiar with the .NET database model. I usually use <code>IDataReader</code> (<code>OdbcDataReader</code>, <code>OledbDataReader</code> or <code>SqlDataReader</code>) to read data from database. Sometimes when I need a bulk of data I use <code>DataAdapter</code>, but what should I do to achieve the functionality of scrollable cursors that exists in native libraries like ODBC? <hr/> Thanks all of you for your answers, but I am in a situation that I can't accept them, of course this is my fault that didn't explain my problem completely. I explain it as a comment in one of answers that now removed.</p> <p>I have to write a program that will act as a proxy between client side program and MSSQL, for this library I have following requirements:</p> <ul> <li>My program should be compatible with MSSQL2000</li> <li>I don't know all the tables and queries that will be sent by the user, I should simply add some information to it, make a log, ... and then execute it against MSSQL, so it is really hard to use techniques that based on ordered field(s) of the query or primary key of the table(All my works are in one database but that database is huge and may change over time).</li> <li>Only a part of data is needed by the client, most DBMS support <code>LIMIT OFFSET</code>, unfortunately <code>MSSQL</code> do not support it, and <code>ROW_NUMBER</code> does not exist in the <code>MSSQL2000</code> and if it supported, then again I need to understand program logic and that need a parse of SQL command(Actually I write a parsing library with <code>boost::spirit</code> but that's native code and beside that I'm not yet 100% sure about its functionality).</li> <li>I may have multiple clients but most of queries that will be sent by them are one of a few predefined queries(of course users still send custom queries but its about 30% of all queries), So I think I can open some scrollable cursors and respond to clients using that cursors and a custom cache.</li> <li>Server machine and its <code>MSSQL</code> will be dedicated to my program, so I really want to use all of the power of the server and DBMS to achieve my functionality.</li> </ul> <p>So now:</p> <ul> <li>What is the problem in using scrollable cursors and why I should avoid them?</li> <li>How can I use scrollable cursors in .NET?</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload