XML Reading Optimization .NET?

Jul 9, 2010

Here's what I've got thus far:

Dim xpDoc As New XPathDocument(strXmlUrl & strXmlInfo(0) & "?xml=1")
Dim xpNav As XPathNavigator = xpDoc.CreateNavigator()
Dim xpExpression(9) As XPathExpression

[code]....

View 4 Replies


ADVERTISEMENT

.net - Optimization With Visual Studio Or A Logic Bug?

Feb 3, 2011

I have an small physics toy application I am developing. It works fine except the particles will not push each other away, only pull towards, I debugged that sub going through it command by command and realised the value 'H' would not change, what ever it was set to during the first pass through the sub is what it kept, the only way to change this value is to manually set it i.e 'h = 1'. Once the calculation is redone on the 'H' value it resets to what it was previously, even though the x1,y1,x2,y2 are all different, thus meaning H should be different.

I think it is me that has made a mathematical mistake somewhere, but I cannot see where it is. I need a fresh pair of eyes to look over my work. Please let me know if you find anything.

[Code]...

View 1 Replies

Antivirus Scan Speed Optimization?

Oct 30, 2009

I have been developing an antivirus using vb.net. The virus scanner works fine but I was thinking of ways to optimize the scanning speed (because large files take forever)

View 3 Replies

Crystal Report And Code Optimization?

Jul 24, 2009

Ok, the error I'm getting is "Load Report Failed" and it happens when I need to load a large number of crystal ReportDocument objects. I've searched on this, and there is a property in the registry that you can change to -1 and it allows to load more, however I'm still getting the error, just after I get about twice as many documents loaded.

The report is basically a one page document (for each client in the database with an interest charge). It displays the amount of interest charged, and other information pertaining to the charge. These documents are basically printed out and mailed to the client.

I created a "Print Preview" screen which has a CrystalReportViewer object, and an ArrayList property. The ArrayList property has an array of all reports, and there are next and back buttons to browse through each report. Once they are satisfied, they will print them all out, and I can dispose of the objects.

The solution for this, from everywhere I've seen, is to "Dispose the object after you are done with it". My problem is that I can't dispose it until they are finished with the print preview screen.

Is there a better way to go about this that won't require too much time to code (we are already over the deadline on this project) or a simple solution to get past the ReportDocument limit? Right now it is erroring on report 150., There are 180 records (as of today) that need to be loaded.

View 1 Replies

Optimization - Initialisation Of Multiple Classes

Jul 16, 2009

In a project of mine I'm currently doing this:

[code]...

all classes inherit docMain and addTemplateToList( X ) adds x to a List(Of docMain). Now my question is: Is there a better way to do what's done in the code sample? I thought of something like:

[code]...

Is this somehow possible in VB.net (Reflection?)?

View 3 Replies

Optimization :: Optimize Own Code Written?

Jan 20, 2011

How can I Optimize my own code written by VB.net? Is there any tools for it? Does Visual Studio have any one? What's your suggestion? I use VS2008 as my editor.

View 1 Replies

[2005] DataGridView Scrolling Optimization

Jan 26, 2009

I have a DataGridView where I bind a datasource (sql query) to it. The row count is high with many columns. Trying to scroll through this DGV is painfully slow.

Does anyone know of any kinds of optimization I can do so that I can scroll faster? Like what is the DataGrid doing when you scroll? Does it repaint every screenful? Does it validate every row? It seems like it is doing something unneeded when a user scrolls.

View 4 Replies

.net - Code Optimization On Minutes Pr Hour Calculation?

May 25, 2010

The following code takes a timeframe in minutes since midnight and creates an array with minutes pr hour. But, it's slow. Any better suggestions out there? (no, changing language is not an option :-) )

Const clDeparture As Long = 123
Const clArrival As Long = 233
Dim lHour As Long
Dim lMinute As Long
Dim alHour(25) As Long

[Code]...

View 3 Replies

Function Optimization (SSRS Report Code)?

Jan 14, 2010

I came across the following code recently and would like to optimize it:Public Shared Function ComputeLabel(ByVal Action As Integer, ByVal Flag1 As Boolean, ByVal Flag2 As Boolean) As String

Dim Prefix As String = ""
If Flag2 Then
Prefix = "Conditional "

[code].....

View 6 Replies

Performance Optimization For Retrieving Xml Table Data?

Mar 17, 2012

I have written a code which does the thing as the title says. The problem is, the whole process took 10 minutes just for 1000 records. Here is the code:(Written in vb.net 3.5 and sql server ce)

MyConnection.Open()
Dim count As UInt32
cmnd = New SqlCeCommand(sqlstring, MyConnection)

[Code].....

View 1 Replies

VS 2010 Code Optimization: Array Initialization?

Jan 20, 2011

I'm wondering if you know if there is a better way to write this code in order to speed it up. It has several blocks of if statements filling arrays, like this:

row0: If x < b(1, 1) Then a1(i, j + 1) = 0
If x > b(1, 1) And x < b(1, 2) Then a1(i, j + 1) = 30
If x > b(1, 2) And x < b(1, 3) Then a1(i, j + 1) = 60

[code].....

View 5 Replies

IDE :: Cannot Find The Optimization Check Box Or Properties For Project 2010?

Mar 7, 2011

i am trying to add a text file in Debug folder. But when i go to project tab to add a new item, there is no option to add a new item? What part of the setting needs to be changed? Using Visual basicExpress 2010.

View 1 Replies

Reading, Then Using, Then Reading Text File?

Jan 2, 2010

I am working on a project in VB 2008 and need it to do this:Read first line from text file (using Openfile)Enter line into textbox on formDo some other codeThen Read second linefrom text fileEnter line into same text boxand loop until we have gone through text fileI am not sure how to read line by line from text file then enter it in textbox. I can open the Openfile and get the filename and everything, but I just am not sure how to read from it or enter that line into the textbox.Here is what I have, its not much but its a start:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim FileReader As StreamReader

[code]....

View 4 Replies

SyncLock / Multithreading - Child Thread Reading The Values Of _do At The Same Time As Another Child Thread Is Reading The Values

Nov 13, 2009

I have a dictionary object (let's call it _do) I am using to cache some values for use in a multi-threaded program. I have a single controlling parent thread, with a timer function _doTimer() which can kick off child threads with a new instance of class MyThreadObject in each. My parent thread has _do as a property and with each time _doTimer() gets called, it may or may not repopulate _do depending on cacheflag settings. I pass a reference to _do to each instance of MyThreadObject and those threads at some point read the values of _do but DO NOT write to it.

What I want is to ensure that the child threads do not try and read _do whilst the parent thread is writing to it. Same thing but very slightly different -> I also don't want the parent thread to write to _do whilst the child threads are reading from it. However there is no problem with 1 child thread reading the values of _do at the same time as another child thread is reading the values - so ideally I do not want each child thread to completely lock out read access, only locking out Write access.. The code is roughly like this:

[Code]....

View 3 Replies

Not Reading Next Row In DB?

Apr 18, 2011

Even though the row is there its not allowing me to read the next row. I thought this would have worked but obviously not.

Imports System.Data.OleDb
Public Class formalQuiz
Dim Questions As String

[Code].....

View 11 Replies

Reading .txt Into VB?

Nov 19, 2010

I've been working on this project that lets me read in file "scores.txt" This file has a student name then a grade. ie:

Scubastevie
56
superman
33

There is no limit to amount of data scores should be able to read.

I'm just trying to be able to read in both sets of data and then have it display this way:

Scubastevie 56
Superman 33

I know you use arrays and I have done some code. Here is what i'm trying. I don't want two arrays, just one.

Public Class Form1
Structure ExamGrades
Dim name As String

[]Code].....

View 7 Replies

XML Reading From URL?

Feb 14, 2010

I am trying to develop a tool for use with an online game which has XML files available online (not downloads, automatically updated XML website things). Sorry if I'm not too clear as I don't truly understand how they work or anything!Anyway, I am trying to make a vb.net program access the information stored in these online XML pages but am having some difficulty. For a start, I tried the vb.net's help files which didn't help a great deal (well done Microsoft) because of the lack of informative comments on each code sample. It merely said that the output would be this (didn't even say where this output would be.

Next I tried searching the web but although I found a few things, some on this site, most of them were questions where the person already had a good knowledge of XML usage so they didn't put many comments on their code.

View 1 Replies

.net - Reading .txt File?

Jul 30, 2011

I am using following code to read text from a .txt file. But I don't know how to perform search within file and how to read a specific line in the text file, based on search.

Dim vrDisplay = My.Computer.FileSystem.ReadAllText(CurDir() & "keys.txt")
MsgBox(vrDisplay)

For an example, if I want to read the line that contains the word "Start", how to do that?

View 3 Replies

.NET Reading The Filename?

Dec 8, 2010

I have a filename SBSA_UPLD_20101208 and I am interested in reading the Last date part which is 20101208. How can I do it?

View 1 Replies

HTML GET Reading XML?

Mar 30, 2012

I am using the following code to get an XML data from a website of mine:

Dim strUrl As String = "http://www.xxx.net/mobileApp/checker.asp"
Dim reader As XmlTextReader = New XmlTextReader(strUrl)
Do While (reader.Read())

[Code].....

View 2 Replies

Not Reading All XML File?

Jul 22, 2009

I have an XML file, shown below:

<?xml version="1.0" standalone="no"?>
<!--RISInsight server settings-->
<Configuration>

[Code].....

Is there a way that I can make it continue to read the XML file?

View 4 Replies

Not Reading Every Line In Csv?

Mar 16, 2012

I have this code and I have no idea why it's not working.

Using parser As New Microsoft.VisualBasic.FileIO.TextFieldParser("\server
etlogoncsvsstafflookup.csv")
parser.SetDelimiters(",")

[Code]....

I want it to read the left value in a csv, if it matches the username then the ADGroup sets to the right column (so we have staff name and then year group)

This code seems to be skipping lines though and not going through each one but I don't know why.

View 13 Replies

Reading A .CSV File?

Nov 13, 2009

I have a vb.net POS application which creates a CSV file (three actually) to store data for later import into a database. All is working well with that part. Details and what I would like to do now follows: A single row of data in one of these files looks like this:

11/4/2009 1:57:50 PM,fg5,1234,21.00,21,0,0,0,0,21.00,12345

There are 11, I will call them columns, in each row, with varying number of rows each day. I need to extract only the information in column 10 from each row and total these numbers. I could do this with a FileOpen(1, <fullpathtofilename>, OpenMode.Input) and an input(1,<variablename>(i)) for each row in a FOR loop. This seems to be cumbersome and a waste of resources especially when the file is very large. Is there a easier, shorter, better, faster (use your own expeditious adjective here) way of doing this? Is there a way to read only the 10th item in each row and for how ever many rows there are? Something like this maybe:

Dim i As Integer
Dim Total as Double
i = 0

[code]....

View 1 Replies

Reading A .url File?

Jan 12, 2010

I am making a browser in vb which can import IE favourites. Here is my code so far:

Dim favespath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
Dim info As New IO.DirectoryInfo(favespath)
For Each fi In info.GetFiles

[code]....

But my code returns a load of HTML instead of the target of the .url file.

View 6 Replies

Reading A CR2 File?

Jul 2, 2011

I am looking to right a vb application that will read a cr2 file (cr2 is a images raw file) I want to be able to read the file resize it, save as a jpg, and auto post to my facebook albums (I have the facebook part done)

Someone has posted before [URL]..

View 3 Replies

Reading A File Bug?

May 27, 2009

The way this file works is there is a null buffer, then a user check sum then a byte that gives you the user name letter count, then a byte for how many bytes to skip to the next user and a byte for which user file the user keeps their settings in.

the loop with the usersm variable in the IF statement sets up the whole file stream for extraction. However with almost the exact same code the else clause specifically the str.Read(xnl, 0, usn - 1) in the else code appears to be reading the very beginning of the file despite the position of the filestream being set earlier?

this is in vb2005

Private Sub readusersdata(ByVal userdatafile As String)
ListView1.BeginUpdate()
ListView1.Items.Clear()
Using snxl As IO.Stream = IO.File.Open(userdatafile, IO.FileMode.Open)

[code]....

View 1 Replies

Reading A File In .net?

Sep 4, 2009

how to read a text file character by character in VB.NET??

View 2 Replies

Reading A Txt File?

Apr 6, 2011

I'm trying to read a .txt file line by line, but Visual Studio doesn't like what im doing. Here's my code so far:

Private Sub LoadGenre()
Dim StrApplicationPath As String = Directory.GetCurrentDirectory() & ""
Dim inputStream As StreamReader = File.OpenText(StrApplicationPath & "myfile.txt")

[code]....

View 3 Replies

Reading A XML Document

Mar 30, 2010

I'm trying to read a XML file, but only certain values.So my XML file is built from the result of a SQL query.[code]The probelm is the loop starts with line 1, good start.But then it will go to line one again, then line 2, line 2 again and so on.When it hits line 5, the first value I need to pull, it then stops.And thats how it is written, so that makes sence.I need to loop through this document, grab the certain values I need, and move on.

View 9 Replies

Reading Attributes From XML?

Jun 2, 2009

How would I go about reading this xml file?

<Data>
<Login Username="d" Password="d"/>
<Application Name="1" Key="1" Owner="1"/>

[Code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved