DataAdapter Solution with support for paging?

  • Thread starter Thread starter Frank Hauptlorenz
  • Start date Start date
F

Frank Hauptlorenz

Hello,

is there are ready component (maybe an data adapter) existing which has
advanced features like paging (with server cursors) but still allows
merging?


Thank you,
Frank
 
Hello Frank,

It seems you need a DataAdapter solution for paging. If I misunderstood
anything here, please don't hesitate to correct me.

Have you tried with DataAdapter.fill method? You can specify the strat
record and page size into it.
public int Fill( DataSet dataSet,int startRecord,int maxRecords,string
srcTable)

http://msdn2.microsoft.com/en-us/library/kxs7kbfe(VS.80).aspx
[DbDataAdapter.Fill Method (DataSet, Int32, Int32, String)]

Is this what you need? if you have any more concern, feel free to let me
know. We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Wen Yuang,

yes, that's what I need. The fill method will not do it, because it
creates everytime a new SELECT statement and this leads to an
inconsistent dataset:

1. Fill method (the first 200 records)
2. Someone inserts a new record in the table (record 187)
3. Fill method (the next 200 records)

I think in step 3, I will get record 199/200 a second time, because the
the records have now shifted.

This would not happen, if the SELECT stays open (or with an server cursor).

Is there an component which can manage this? If not I have to code this
myself.


Thank you very much,
Frank
 
Hello Frank,
Thanks for your reply.

In your scenario, I believe we will get the record 199/200 twice. In such
case, I'd like to suggest you may add timestamp column into table, and
check it before the select command.
Is there an component which can manage this? If not I have to code this
myself.
ADO.net doesn't support server cursor. I'm afraid you may have to code such
component by yourself if you need that...

Please feel free to let me know if there is anything we can help with. We
are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Frank,

This is Wen Yuan, again. We haven't heard from you a couple of days.
I just want to check if there is anything we can help with.
If you face any further issue, please feel free to update here again.
We are glad to assist you.

Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
======================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hello Wen Yuang,

no everything is okay. I've accepted that .net is not as good as I
thought :-)
I will develop my own component for this task.

Thank you,
Frank
 
Hello Frank,
Thanks for your reply.

We are indeed sorry for inconvenience this may have caused.
For server cursor, you will have to add your own ADO code to implement the
task.
I'm afraid to say this is a product limitation. If you really have concern
on this very much, we'd like to suggest you may post the suggestion to our
Connect feedback portal. Our Product developer will evaluate them seriously
and communicate with you directly on the issue there.
http://connect.microsoft.com/VisualStudio/

Improving the quality of the products and services is a never-ending
process for Microsoft. :)

Let me know if you have any more concern. We are glad to assist you.
Have a great day,
Best regards,

Wen Yuan
Microsoft Online Community Support
======================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top