How To Improve Performance Of App By Error Catching

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


ADVERTISEMENT

Should Use View To Improve Performance

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

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

Asp.net - Correct Way To Not Use Eval In A Repeater And Improve Performance?

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

Improve Performance Of A Windows Forms Application?

Apr 10, 2009

How can I improve the performance of a Windows Forms application?

View 1 Replies

Improve Performance Of Contact Fetching Using EWS Managed API?

Jul 30, 2010

improve performance of Contact fetching using EWS managed API?

View 1 Replies

Improve The Performance Of A Windows Forms Application?

Jan 18, 2012

How can I improve the performance of a Windows Forms application?

View 5 Replies

Does Making COM Files 'embedded Resources' Improve Performance

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

Improve Paged Gridview Performance : Huge Underlying Dataset?

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

Improve The Performance Of Reading Data From Excel And Writing To Datatable?

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

Catching A Ghost Error

May 8, 2009

I have 5 errors that come up every time I run my project They are all "A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll"

I have try catch blocks around every piece of code I have written, and it does not seem to catch them, so I opted to catch the appdomain.UnHandledException.

That does not seem to catch them either If I step through the code line by line (several hundred lines so I hold down f8) it does not make the error...

Only when I run full speed.

I can only figure that I am accessing something maybe before an object is completely drawn, however how in the heck would anyone suggest I go about finding it, and why will my global event handler not catch them?

View 3 Replies

Catching Error In BackgroundWorker?

Dec 22, 2009

I am using BackgroundWorker to connect asynchronously to a database. Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code]...

While my connection is being opened, I have a "Loading" animation show in a lblCalibration. Once it's connected, the animation stops successfully and shows the calibrated record that I am fetching from my db.

However, if there is an error while connecting to my db for any reason, it does not work. My app freezes. The reason is because I am trying to make a cross-thread call while trying to Catch the error in the DoWork event.[URL]..

but still cannot seem to make any progress. Does anyone have any tips or advice on how to properly catch the error and still run BackgroundWorker?

View 6 Replies

Clearing Labels After Catching An Error?

Apr 13, 2011

I run a program multiplying decimals with integers. If a user enters a non 0 number etc. the try catch works its charm. i added some lines to clear the text boxes and that works fine but

lblReva.text = ""

does not clear the labels where the answers are displayed, on the contrary it displays the correct value calculated and enters a 0 for the erroneous entry. I would like to clear all the labels and text boxes(except the instruction and assingment labels)so the form is clean once more so the user can try to be "more on" target next time.

Try
decReva = CDec(txtBoxa.Text)
decRevb = CDec(txtBoxb.Text)

[code]....

Not integers but constants declared as decimals but that is immaterial here. "Doh"

View 3 Replies

VS 2008 Error Catching With Registry Settings

Nov 4, 2009

I'm editing some settings in the registry and then adding items to a ListView.

[Code]...

If I'm not mistaken, the code will not continue in the Try block if the first part fails and then move on to the catch statement, correct? I'm adding and deleting a bunch of different entries in the registry and the computers I've tried my app on so far, have not failed. So I'm not able to test if this method will work for error catching. If there's a better method, I'd appreciate the info.

View 4 Replies

Asp.net - Login.aspx And Catching The AD Error Authentication Response Value?

Dec 11, 2009

I have used the code from the link below to create a basic login page in front of the Microsoft Live Single Sing On.[url] I managed to combine the two together(LiveSSO w/Forms Authentication) turning off the Integrated Authentication in IIS from the SSO setup.All works as expected if the user successfully authenticates with AD. THE PROBLEM that I am having is that when the user failes to authenticate it only returns: "Error authenticating user. Logon failure: unknown user name or bad password". This message appears also when the user is set to change the password at next logon. What I want it to do is to read the error code of exactly why it failed so I can setup a redirect to a password reset page (i.e. if error is "User flag is set to change pswd" etc.etc.)From the page linked above you can see the VB code of LdapAuthentication.vb which does the trick of authenticating the accounts or returning the error message if the login fails. The part that returns the "Error authenticating user. Logon failure: unknown user name or bad password." Is handled by this subroutine:

[code]...

That's what I have been trying to customize to see how it can return a specific code based on the user account AD flags, instead of the generic message

View 2 Replies

Catching Error - Run A Vbscript From (Visual Studio 2005 / 2008)

Mar 22, 2010

I know it is possible to run a vbscript from within VB.NET (Visual Studio 2005 / 2008) s it possible for VB.NET to catch the vbscript's exit code? I know it is possible within a HTA:

[Code]...

View 2 Replies

Office Automation :: Catching Excel Runtime Error From A WinForm?

Dec 30, 2009

[URL] using this method results in a modal dialogue box which the user must manually close by pressing end or debug or the VBA (and consequently the VB) code will hang.I am unsure how to get the message box to close.

View 11 Replies

Turn Off Windows 7 X64 Ultimate Error Catching Or Activate Developer Mode?

Nov 4, 2010

I've been whining for several months about the way Windows 7 prevents application exceptions from actually occurring, and arbitrarily assigns "compatibility settings" without actually detailing what those settings are, even during Visual Studio Debugging operations. Am I just completely ignorant to some setting I can toggle to turn all that garbage off and make Win7 act like an operating system that wasn't designed for a 2 year old? It never hurts to try. In a worst case scenario,

View 15 Replies

How To Improve My Coding

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

VS 2005 How To Improve This

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

C# - Will Learning WPF Improve Skills In ASP

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

Improve Reading Of A File

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

Improve The UI Of Xtrareport From Runtime?

Mar 31, 2010

I am having a problem in paging for XtraReports. How can I improve the report paging from runtime and also I would like to initialize the reportviewer from pageload.We are designing the reports from runtime , so the data on multiple pages is not working i mean I am not comfortable with it. I woulld like to do paging and limit the number of records on the page from runtime.for example i would like to add a PageInfo component and add a "Go to page no.." like this.

View 1 Replies

Looking On Input For Areas To Improve?

Jul 21, 2011

I'm currently in a programing class for vb.net. It's my first true exposure to OOP and I'm looking for some advice on areas where I could improve. I was wondering if someone would be willing to look at one of my programs that I have written and offer advice on areas where I can improve and things that I made much more complicated than they need to be. I'm not looking for a line by line critique just a general look at things to improve upon in the future.

View 2 Replies

VS 2005 Improve The Look Of Program?

Jan 27, 2011

I'm currently writing a football management game (Australian football) and would like to pretty it up a bit. The match engine simulates each player as a small circle, much like the old Championship Manager games. While I'm fine with this style, I'd like to improve the look. I'm just using the simple graphics tools in VB to draw circles and the oval in the background which they play on. They move around using a timer. It just doesn't look very good. The movement isn't smooth and the circles look jaggy and unprofessional. Given that I'd ultimately like to release this product, I want to make it look a lot better.

What are some 2D graphics engines that I should look at? I don't need fancy animations or anything, just some nice smooth movement and nice looking circles. Doesn't seem like I'm asking for much does it? It'd be also nice if I could add in a chrome-like look or something along those lines.

As for the menus and such, well, they are currently just the boring grey VB style. That's fine for now but, as mentioned earlier, I want to release this game at some point. How can I change all of the menus and such so that this doesn't look like a game made in visual basic...basically. I've seen skins before but I'm not really interested in giving my game some generic style. I want to be able to customize all of it for myself. I just don't know how to! Simply fiddling with the colours and fonts of the default VB controls isn't enough.

View 9 Replies

.net - Improve Coding With List Intersect Using Net 3.5?

Jan 15, 2009

I've a class that has a list of IDs with a function for adding new IDs from a list of objects.I've got this resolved, but I'm sure this can be done with much less code.Public Class Page

Private _IdList As List(Of Integer)
Private _HasNewItems As Boolean = False
Public Sub AddItems(ByVal Items As List(Of Item))
Dim itemsID = From itemX In Items _
Select itemX.ID

[Code]...

View 3 Replies

C#/.NET: How To Improve Anti-alias Quality

Aug 16, 2011

In Reporting Service, I need to have a vertical, starting at bottom, bottom-to-top, horizontally middle aligned text.The only way to do this is to create an image in code, and set this image into the title column.See the code below.Basically, it works fine, just that the anti-alias quality is pretty crappy.Is there anything I can do to improve it ?The vertical text is somehow pale, and not full black, and also there is smearing all around the text, in the background color.As well as it appears bolder than the text on the left, but both have format arial, size 8, bold I've tried all other values of System.Drawing.Text.TextRenderingHint.*, as well as no anti-alias at all but the current one seems to be the least crappy.I've also tried to change the image format, to no avail:

Function LoadImage2(ByVal sImageText As String, ByVal sImageTextMax As String) As System.Drawing.Image
sImageTextMax = sImageTextMax.PadRight(15)
Dim iFontSize As Integer = 8 '//Change this as needed

[code]....

View 3 Replies

Improve On The Inserting Of Data String?

Sep 23, 2009

I am doing a project of inserting the data into the database through the used of textbox. I am using 5 textboxes when I run the application. The application is working fine but the problems is that when I post this codes, there is answer that I have to modify the inserting part to make it better. Is there any other way to make it better for the part when I am inserting the data? The program that I am using to make this application is visual studios 2005 and sql server 2005 for the database.

Imports
System.Windows.Forms
Imports
System.Data.SqlClient

[code]....

View 4 Replies

Improve Perfomance Creating DataTable?

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

Improve TcpClient Connection Speed?

Jan 31, 2012

I am writing a VB.NET app that connects to a legacy application using TCP.

The communication is working fine and is very quick once connected, but there is always a delay (of around 2.5-3.5 seconds) when I create the new connection even though I am connecting to my local machine[code]...

View 2 Replies







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