I am trying to display some database records in datagrid using dataset.
the records need to be displayed are couple of thousands, but the records in
database that the SQL query needs to exam are more than 70 thousand, and it
is really slow to get the dataset ready to populate the datagrid.
I am sure there are solutions on this issue, but I just don't know :-(
Can anybody point me out any good solution to minimize the time used to
populate the datagrid?
Thanks a lot!
One thing I thought of is to make the datagrid starts to display records
simultaneously when data is filling into dataset. but I am not sure how to
achieve that. 3 5397
Hi,
Here are few articles that might help. http://www.vb-tips.com/default.aspx?...6-fc0d5c470f53 http://www.vb-tips.com/default.aspx?...6-def86a1baeef
Ken
--------------------
"Kai Zhang" <ka*******@zero n.biz> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am trying to display some database records in datagrid using dataset.
the records need to be displayed are couple of thousands, but the records in database that the SQL query needs to exam are more than 70 thousand, and it is really slow to get the dataset ready to populate the datagrid.
I am sure there are solutions on this issue, but I just don't know :-(
Can anybody point me out any good solution to minimize the time used to populate the datagrid?
Thanks a lot!
One thing I thought of is to make the datagrid starts to display records simultaneously when data is filling into dataset. but I am not sure how to achieve that.
Thanks for your reply, Ken.
for the first link: http://www.vb-tips.com/default.aspx?...6-fc0d5c470f53
It allows user to know how much records have been loaded, and how long it
may take to finish loading the records, however, it does not allow user to
view the records quicker (unless update "Datagrid.DataS ource" while
Datareader is reading records which may be very nasty, but I will have a
try).
for the second link: http://www.vb-tips.com/default.aspx?...6-def86a1baeef
I am using the SQL 2000, so I cannot use this approach unless I implement
the NTile() by myself.
Hi Ken,
I did some changes to the sample code you suggested me to read on link: http://www.vb-tips.com/default.aspx?...6-fc0d5c470f53
Here is my code:
...
dgbase.DataSour ce = table 'dgbase is the datagrid,
'table is a DataTable
which already has columns
While reader.Read 'reader is a SqlDataReader
Dim row As DataRow
row = table.NewRow()
Dim tempObject(tabl e.Columns.Count - 1) As Object
reader.GetValue s(tempObject)
row.ItemArray = tempObject
table.Rows.Add( row) 'Add new row to dgbase.DataSour ce
dgbase.Refresh( ) 'show the new added row
End While
...
The above code works fine, except all the controls on the form do not
respond to any interaction while the records is loaded into datagrid.
I know I can solve this by using a separate thread to run the above code,
and I am working on it. hopefully it will be OK.
Thanks again, Ken.
"Kai Zhang" <ka*******@zero n.biz> wrote in message
news:eT******** ******@tk2msftn gp13.phx.gbl... Thanks for your reply, Ken.
for the first link: http://www.vb-tips.com/default.aspx?...6-fc0d5c470f53 It allows user to know how much records have been loaded, and how long it may take to finish loading the records, however, it does not allow user to view the records quicker (unless update "Datagrid.DataS ource" while Datareader is reading records which may be very nasty, but I will have a try).
for the second link:
http://www.vb-tips.com/default.aspx?...6-def86a1baeef I am using the SQL 2000, so I cannot use this approach unless I implement the NTile() by myself. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Neil |
last post by:
I previously posted re. this, but thought I'd try again with a summary of
facts.
I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that
is linked to the database via ODBC and has been in place for several years
without any performance problems.
Recently I added a couple of fields to the output of the view, and it became
very slow when scrolling. When just opened in the database window, the
linked view takes about...
|
by: Jarek Micha³owski |
last post by:
Hi, i am newbie here and need help. Subject: Multidimmensional Cube
In the following code I send the sql query to mssql and retrive data to
objCellSet object. My problem is:
In retrive data I have 10 000 records, get_Item() method is too slow, does
anybody knows why? Is any better solution for this problem?
Thanks
Jarek
if (objConn == null)
|
by: VM |
last post by:
I have a 35000 line datagrid and updating one field in all 35000 rows takes
an eternity. How come? Since I don't have the datasource available (it may
be a table or view), in my example I do it like this:
for (int i=0;i<34000;i++) //the first 2000 records took 2 mins.
{
dataGrid_auditAddress = "MARKED";
}
Any help would be appreciated.
|
by: Jennyfer J Barco |
last post by:
In my application I have a datagrid. The code calls a Stored procedure and
brings like 200 records. I created a dataset and then a dataview to bind the
results of the query to my grid using MyGrid.DataBind() Once the
records are loaded, to handle the next, previous button is too slow. I have
in the same screen OptionsBox and everytime I click in any option I show
some text fields in the screen. Anything the user does is very slow. When...
|
by: jwogick |
last post by:
I'm hoping someone can help me!
I just have a simple form with a datagrid displaying child records
from a dataset that contains two related tables Parent
table>Clients Child table>cases. using the designer I tell the
datagrid to display the child records only from the dataset (Relation
called ClientsCases table>cases) it will display the data fine but
when I add a new tablestyle with custom columns it does not change
the columns in the...
| |
by: qilinw |
last post by:
In a winform I want to display database records using datagrid, with
dataset for a couple of thousands records it seems very slow. I have
read an article in group microsoft.public.dotnet.languages.vb. It uses
datareader to solve this problem, it's a good idea. I have translated
it in c# and want to run this in a separate thread, but it does not
work, i have a blank datagrid.
Anyone can help me? Thanks a lot.
My source code is...
|
by: Arpan |
last post by:
Assume that a database table has the following 4 columns - ID, UserID,
Subject & Marks. I am retrieving the records existing in this DB table
& displaying them in a DataGrid like this:
<script runat="server">
Sub Page_Load(obj As Object, ea As EventArgs)
Dim dSet As DataSet
Dim sqlConn As SqlConnection
Dim sqlDapter As SqlDataAdapter
|
by: archana |
last post by:
Hi all,
Can anyone tell me what exactly VirtualItemCount in datagrid. I read
on msdn but not clear about it.
Any help will be truely appreciared.
thanks in advance
|
by: eighthman11 |
last post by:
using Access 2003 and sql server version 8.0
Hey everyone. Created a text box where the user types in an Inventory
number and it takes them to that inventory number on the contimuous
form. The form is based on a link table to sql server. Here is the
code:
Dim rst As DAO.Recordset
Dim InventoryItem As String
InventoryItem = "'" & "TextBoxValue" & "'"
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |