HighTechTalks DotNet Forums  

Binding large data

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss Binding large data in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Binding large data - 09-21-2005 , 05:53 AM






hi experts,

we have many data says millions of records to be displayed using
ADO.net:
Public Function GetResultDataset(ByVal p As Long, ByVal n As Long)
As DataSet
Dim SQLResult As String = "Select * from Files f inner join
Folders d on f.folderId=d.folderId"
Dim AdpResult As New OleDbDataAdapter(SQLResult, Conn)
Dim ds As New DataSet
AdpResult.TableMappings.Add("Table", "Result")
'AdpResult.FillSchema(FilesDS, SchemaType.Mapped)
AdpResult.Fill(ds, p, n, "Result")
Return ds
End Function
Because there is so many data, the fill method retrieve all data into
memory. It is not practical to display all. Can I make a "connected"
dataset so that when scrolling to see data, it get from database
directly instead of just memory copy of the data? In old recordset way,
we can do so, but how can we do in ADO.net?

Alternatively, we can use paging: Paging Through a Query Result
http://msdn.microsoft.com/library/de...ueryResult.asp
However, we don't want to add additional navigation buttons but to use
datagrid's vscrollbar. The problem is that every time a new databind,
column width and other settings are resetted:

Private Sub DgdResult_Scroll(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DgdResult.Scroll
Dim DgdVScroll As VScrollBar = CType(DgdResult.Controls(1),
VScrollBar)
Dim v As Long = DgdVScroll.Value

DgdResult.SetDataBinding(mSearchDB.GetResultDatase t(DgdVScroll.Value,
DgdVScroll.LargeChange + 1), "Result")
DgdVScroll.Maximum = mSearchDB.GetResultCount()
DgdVScroll.Value = v * 2
End Sub

Please advise.


Reply With Quote
  #2  
Old   
Michael Nemtsev
 
Posts: n/a

Default Re: Binding large data - 09-21-2005 , 05:34 PM






Hello alanwo (AT) gmail (DOT) com,

If your can use forward only cursors the best solution for u is using DataReader
instead of DataSet
it improves your data carrying abt 20 times.

In other case I'll use WebMethod ZipFilter to pack your dataSet and send
it to client

Quote:
hi experts,
we have many data says millions of records to be displayed using
ADO.net:
Because there is so many data, the fill method retrieve all data into
memory. It is not practical to display all. Can I make a "connected"
dataset so that when scrolling to see data, it get from database
directly instead of just memory copy of the data? In old recordset
way, we can do so, but how can we do in ADO.net?

Alternatively, we can use paging: Paging Through a Query Result

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche




Reply With Quote
  #3  
Old   
AT
 
Posts: n/a

Default Re: Binding large data - 09-22-2005 , 02:26 AM



Thanks Mike,

But the point is that we can't use DataReader for Windows Forms
Datagrid but web forms only. We are developing Windows form
application, so DataReader can't help.

Alan


Michael Nemtsev wrote:
Quote:
Hello alanwo (AT) gmail (DOT) com,

If your can use forward only cursors the best solution for u is using DataReader
instead of DataSet
it improves your data carrying abt 20 times.

In other case I'll use WebMethod ZipFilter to pack your dataSet and send
it to client

hi experts,
we have many data says millions of records to be displayed using
ADO.net:
Because there is so many data, the fill method retrieve all data into
memory. It is not practical to display all. Can I make a "connected"
dataset so that when scrolling to see data, it get from database
directly instead of just memory copy of the data? In old recordset
way, we can do so, but how can we do in ADO.net?

Alternatively, we can use paging: Paging Through a Query Result


---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche


Reply With Quote
  #4  
Old   
Michael Nemtsev
 
Posts: n/a

Default Re: Binding large data - 09-22-2005 , 04:24 AM



Hello alanwo (AT) gmail (DOT) com,

yep, but we can bind DataRecord to the DataSet on the client side .
This will be hardly more expensive that carying DataSet with million of record.

However, I'm bending to use zipFilter

Quote:
Thanks Mike,

But the point is that we can't use DataReader for Windows Forms
Datagrid but web forms only. We are developing Windows form
application, so DataReader can't help.

Alan

Michael Nemtsev wrote:

Hello alanwo (AT) gmail (DOT) com,

If your can use forward only cursors the best solution for u is using
DataReader
instead of DataSet
it improves your data carrying abt 20 times.
In other case I'll use WebMethod ZipFilter to pack your dataSet and
send it to client

hi experts,
we have many data says millions of records to be displayed using
ADO.net:
Because there is so many data, the fill method retrieve all data
into
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.