How To Improve Reading Performance From A Datatable
Oct 25, 2010
i have a datatable with about 10000 rows and few columns (4)I have noticed that the process of reading a big table its quite slow..is there a way to improve performance in reading a datatable?
View 15 Replies
ADVERTISEMENT
May 21, 2011
I want to import data from excel and move that to Datatable in VB.NET 2008. I wrote and working but its taking too long time.. for 1500 records its taking 4.40 min.
[Code]...
View 1 Replies
Mar 9, 2010
i'm developing vb.net application. There are 10 ways of transactions. I want to produce 'Purchase register report'. For that I want to find what amount of effect has been made by each transaction on ledgers of 'Purchase account'. Purchase account has almost 30 ledgers. And transactions can produce about 10000 rows in database for a year. Now if I produce month wise report for a year, there will be 10000*30=300000 row scanning which makes it very slow in execution.
View 6 Replies
Mar 7, 2009
I'm trying to improve my app with some error catching. I have a module that downloads a file from the Internet to a local folder. At the moment, if the local folder doesn't exist, it just crashes here:
strLocalFile = New FileStream(pPath, FileMode.Create, FileAccess.Write, FileShare.None)
with error:
System.IO.DirectoryNotFoundException was unhandled
Message="Could not find a part of the path 'C:Documents and SettingsSimonDesktop estdownload.zip'."
Source="mscorlib"
How can I do something with that error and stop my app from crashing? Ideally, have a messagebox show saying 'directory not found' or similar.
View 5 Replies
May 31, 2012
I have a repeater which takes 270 seconds to render and actually ends up crashing all browsers. The SQL to retrieve the data takes about 10 seconds. I wanted to remove the Eval's to see if that speeds up things a bit, but I am having trouble with the correct syntax. I have doubts that this would actually improve performance as I am dealing with 150,000 records. Would a GridView or other control be faster? Would using LINQ to SQL improve performance? Here is the code for the Eval:
[Code]...
View 1 Replies
Apr 10, 2009
How can I improve the performance of a Windows Forms application?
View 1 Replies
Jul 30, 2010
improve performance of Contact fetching using EWS managed API?
View 1 Replies
Jan 18, 2012
How can I improve the performance of a Windows Forms application?
View 5 Replies
Jun 25, 2009
If I took a COM object (specifically Excel 2003 workbook) and made it an embedded resource of my executable, would that improve the notoriously slow .NET-COM interop at all?
View 1 Replies
Jul 1, 2010
I'm currently working with a gridview that has a huge underlying dataset.I'm almost certain that I saw something about a new facility in Visual Studio 2010/.NET 4, which would improve the performance (e.g. doesn't download all the data on databind, but rather only what data required for current page). My guess would be that it was using AJAX.I didn't need it at the time I saw it, and now I can't find it, even though I've been hunting online for a while.
View 2 Replies
Feb 20, 2012
I have following code and it's slow to load first time. CSV file is about 4mb 16000 rows.
If Session("tb") Is Nothing Then
Dim str As String()
If (IsNothing(Cache("csvdata"))) Then
[Code].....
View 1 Replies
Feb 12, 2012
I read a text file every second..[code]The file is generated from another program and it's costantly updated more times per second.The sense of the code (StartIndex) is to read only the rows that I have not read from the last time.The code works without problems until the file is about 2.5 Mb in dimensions... for higher dimensions I have problems and all becomes very slow.Using and fs.Dispose() are like Microsoft suggest (and in fact if i run the code analisys I have no problems), but surely the problem is not here.The question is: is my code right or there is way to improve the reading?? Is there way to read only the tail without to open the whole file?
View 5 Replies
Oct 13, 2011
DataTable1“ About 16 000 entries“ coming from SQL[code]...
I have tried using a NOT IN clause in my SQL query with all the entity numbers from table 2 in that query but it takes over 10 minutes to execute.
Using a For Each loop and comparing each row takes about 3 minutes
View 3 Replies
Mar 16, 2009
I have a program in where I need to loop though the entire dataset.datatable. I takes a long time. What is the alternative I can use to do the some job but faster?
View 4 Replies
Apr 30, 2009
from a performance point of view is it faster to work with linq to sql or dataset.datatable?
View 6 Replies
Jun 14, 2012
i have this simple code from a vb.net project:
Using sr As New StreamReader(NewSwitch.ActFolder & NewSwitch.ActSShowName)
worker.ReportProgress(LoadSwitchProgressType.Normal, "Loading Active SupportShow, size " & NewSwitch.ActSShowSize & "...")
NewSwitch.ActSShowData = sr.ReadToEnd
End Using
Obviously it reads a file - a 20M text file to be exact. Now if this 20M file is on my PC, it reads in about a second. If i open this same file in a text editor, such as Conext, its about the same.However, if this 20m File is on a network location, the Context text editor loads the file in about 1 min 40 seconds. I would have expected similar times with my vb.net code, but it took 7 minutes 45 seconds.I have no idea what the text editor uses to read a file, but i figure i must be able to get similar time in vb.net somehow.
View 2 Replies
Nov 5, 2009
Which one is more faster between DataTable and SqlDataReader while I'm trying to fill Data into FlexGrid with VB.NET?
View 3 Replies
Aug 7, 2009
I have this code, to read image (saved as varbinary(max) in database):
Private Sub ReadImage()
Dim connection As New SqlConnection(strConnectionString)
Dim command As New SqlCommand("SELECT [Image] FROM z1 WHERE x=1 AND y=1", connection)
[code]....
But it isn't very convenient code. It reads bytes from table, save them to file, and finally open file as image.How can I read it directly to image, without saving as file?
View 2 Replies
Aug 29, 2011
I am having dataset with 5000 records.I am reading them in the below 2 functions and writing to excel.
FillDataRows1(worksheet)
FillDataRows2(worksheet)
private sub FillDataRow1(byval ws as worksheet)
[code]....
When I create thread also it is taking same time .
View 1 Replies
Mar 25, 2011
An in-line table valued function in SSMS takes about 6 seconds to return 11088 records. The same function in VB .Net 4.0 using TableAdapters.InputTableAdapter.GetData (Created with data set designer) takes about 15 minutes complete.Both are executed from the same workstation.Why does this discrepancy exist?
Workstation:
Windows XP SP3, 2GB
VS2010 Ultimate
.Net 4.0 Framework
Server:
SQL Server 2008
View 3 Replies
Jan 8, 2009
I need to retrieve a portion of xml into a datatable
<Product>
-<productID>123</productID>
-<productName>123</productName>[code]......
Now Under product tag there are ProductID, ProductName and ProductFeatures.Under ProductFeatures tag there are three "productfeaturetext" tags.I only need to extract "Features" tag into a datatable to loop it, how this can be done ?
View 3 Replies
Jan 7, 2011
how i see if my cache is empty all my syntax errors are coming when i am trying to see if the cache is null and if it is to run the stored procedure
If RadioButtonList1.SelectedIndex = 0 Then
If Cache["netcache"] = null Then
bcmd.CommandText = "yearlynetsales"
[Code].....
View 1 Replies
Aug 15, 2011
My program reads a 3rd party .txt file using OleDb and reads the file into a datatable. It's overall working fine except a user will occasionally have a problem reading a file. At this point.
Line that gets hung up
Try
Dim comm1 As New OleDbCommand("SELECT * FROM " & safeFileName & " Where " & Status & " = '" & StatusClosed & "'", con)
Dim dasold As New OleDbDataAdapter(comm1)
dasold.Fill(dtsold)
AddColsold()
[Code] .....
It can not retrieve a date for one of the fields, then gives error and does not get dates for each records after the one it gets hung up on but the date is in the file. If I open the file in excel and play with the column sizing, for instance just autoformat column width then it read the date and will work fine. I have looked at the file in notepad and cant see anything wrong in particular on the record it gets hung up on. I have no control over the .txt file since it comes form a 3rd party.
View 16 Replies
Jun 7, 2009
I have an untyped-Dataset with two related DataTables, and I have a grid bound to the parent DataTable. I used the WriteXMLSchema() method of the parent DataTable in order to save the schema in a xml file. Then I opened the file with the Notepad, deleted two columns from the schema file and saved it. After that, I used the ReadXMLSchema() of this DataTable but -contrary to what I would have thought- the DataTable's structure was unchanged. Using the debugger I noticed that after calling the method the number of columns was the same. Why? How can I make the DataTable's schema to be changed by using a file?
notice that I am using the DataTable's methods and not the Dataset's because I do not want to touch the child DataTable.
View 2 Replies
Sep 27, 2011
Dim ds As New DataSet
Dim xmlfile As XDocument = XDocument.Load("devices.xml")
Dim reader As XmlReader = xmlfile.CreateReader
[code].....
View 14 Replies
May 26, 2011
Heres the InnerException:{"Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall."}Stack Trace:
" at MyNetworkStream.HandleOrRethrowException(Exception e) at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count) at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count) at
[code].....
View 1 Replies
Oct 31, 2009
I've been searching but just can't seem to find an answer. I can't believe this should be hard but I just can't get it to work. I'm reading in some records from an Access DB into a DataTable. I list one of the columns in a listbox. The user selects an item, then I want a textbox to display what's in a different column for that row.
[Code]...
View 6 Replies
May 28, 2011
Whenever i work on form, so i use this code
CODE:
Now i have 2 things to ask?
1) is this right way which i use?
2) I use the same on every form regardless on number of forms? is it fine to use it on every form?
View 3 Replies
May 28, 2011
whenever i work on form, so i use this code,[code...]
now i have 2 things to ask?
1) is this right way which i use?
2) I use the same on every form regardless on number of forms? is it fine to use it on every form?
View 2 Replies
Dec 2, 2010
I have worked in Windows Forms for years, and still do. I'm not acquainted at all with the ASP.NET technology and no other Web related technology. I have worked with:
Oracle Form Builder;
Visual dBase 7.5;
Delphi 2.0, 3.0 and 7.0;
Sybase Power Builder 10.5;
Visual Basic 6;
Visual Basic 2003/2005/2008;
And ultimately, Visual C# 2005/2008.
I'm mostly a C# programmer with a growing experience in VB.NET for the current year. What would be the way to go to learn WPF the best possible way while taking into account my experience? And I'd like to know, will learning WPF improve my skills in ASP.NET and the like?
View 4 Replies