473,382 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Best way to display large

MJE
Hi there,
I have a binary file which consists of header information followed by
the 'dataset', made up of 8 byte doubles.

I'm trying to find the best way to display this data in a datagrid. My
current method uses binaryreader.ReadDouble to read each value from the
file and construct a DataTable which can then be binded to the
datagrid. However, it's very slow...

Dim fs As FileStream = New FileStream(psFileName, FileMode.Open)
Dim br As BinaryReader = New BinaryReader(fs)
Dim i, j, iDataStartPos, iNumRows, iNumCols as int32
Dim dWorkRow As DataRow
Dim oDataTable As dataTable

' These can be determined from the header:
iDataStartPos = 150
iNumRows = 3000
iNumCols = 1000

br.BaseStream.Seek(iDataStartPos, SeekOrigin.Begin)
pdtDataTable = New DataTable("DATFILE")

For i = 0 To iNumRows - 1
dWorkRow = pdtDataTable.NewRow
For j = 0 To piNumCols - 1
dWorkRow(j)= br.ReadDouble()
Next
oDataTable.Rows.Add(dWorkRow)
Next

Can anyone suggest a better method?
Thanks in advance.

Nov 21 '05 #1
0 741

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

131
by: Peter Foti | last post by:
Simple question... which is better to use for defining font sizes and why? px and em seem to be the leading candidates. I know what the general answer is going to be, but I'm hoping to ultimately...
2
by: Chris Mullins | last post by:
I'm building a GUI that needs to be able to view a large amount of text arranged in rows. Large being anywhere from a few hundred lines through a few hundred thousand. I need a way to "cap" the max...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
1
by: Bernhard | last post by:
Hi, Presently I am writing a programm to display the status of phone extensions. For this purpose I use a WinForm application. The status of the lines with the respective user name should be...
4
by: DoomedLung | last post by:
I have been developing an image gallery which needed to be dynamic as possible. so I have placed the gallery in a div plus a div containing the large image to be displayed. It works by changing...
3
by: DoomedLung | last post by:
I have been developing an image gallery which needed to be dynamic as possible. so I have placed the gallery in a div plus a div containing the large image to be displayed. It works by changing...
20
by: Joe | last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX but wasn't too happy about the way data had to be populated along with some other issues which slip my mind right now and...
7
by: lister | last post by:
Hi, I have a situation where I have a large block of HTML code that is conditionally displayed. In effect I have: html page some html <?php if (bShowBlock)
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: Now You Know | last post by:
Best Christmas Lights Decoration Sale Installation in Los Angeles 818-386-1022 (These types of Innovative lights will definetly add to your Christmas decor) Here are the tips to use: The most...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.