Long Running Operation, Nonresonsive Program?

Jun 30, 2010

I have written a program that searches a bunch of urls and pulls out information that I need. The program works to an extent. Everything codewise works, but it seems like I did a sloppy job of pulling the code together. After about 10 minutes of running, the program just becomes unresponsive and I have to close it through task manager. I've seen it range from 100k to 350k in memory useage. It also uses about 80%+ cpu usage at all times. I hope someone might be able to see something that I forgot or did wrong as the program is meant to run almost full time, executing parts of code on certain days/times.

Dim con As New SqlClient.SqlConnection
Dim strCon As String = "Data Source=server;Initial Catalog=database;Integrated Security=True"
con.ConnectionString = strCon

[code]....

View 1 Replies


ADVERTISEMENT

Force A Progress Bar To Update During A Long-running Operation In Program?

Dec 19, 2010

I am running a test program for VB.NET, and it will simply crunch a million numbers in for loop. I've linked a variable implying the progress of the for loop with the progress bar, but it seems that when I run the program, the progress bar does not update itself. The bar itself has only value 0-100 as input (as stated in the document) and I've tested it without using the for loop, and it works.

View 2 Replies

Program Becoming Unresponsive Whilst Running Long Code

Jan 31, 2011

I'm currently trying to write a football simulator but am having issues with the computer becoming unresponsive. There are long lines of code (several thousand lines) that are executed over and over as one run of the code is equivalent to one second of game time. While the game is setup to be like Football Manager where you watch the game live, there will also be cases where the entire game is simulated without you watching. When doing a full sim of a game, I just have a loop which executes the code block 7200 times (games go for two hour roughly).

At the moment this takes about a minute but even when I get it down to the desired 5-10 seconds or so, I dislike the fact that the computer becomes completely unresponsive during this time. In a round there are 9 games and you'll be simulating without watching 8 of them. You're looking at 1-2 minutes of simulation time or possibly more. I can't have a loading screen that long! How can I program the game so it runs these simulations yet the game still remains responsive? It'd be fine if the user could muck around in the menus and stuff while the simulation runs.

View 10 Replies

ProgressBar For Long Looping Operation?

May 13, 2012

i want to ask about progressbar i mke some looping, maybe long looping, can be 2000 record or maybe 20K record but i want the progressbar show the progress of that looping example = i have 20.000 record, when it loop on the 2.000 record, the progressbar automatically 10%, then if 2.200 then progressbar become 11%.. and the progressbar is dynamically changed within the record i have read some about BackGround worker, but i dont know the concept.so i count the record, and then set the maximum value for progressbar, and inside looping, i set the value 1 by 1 but, if i count it first, then it will 2 time loading and not as fast.

here is my simple code

Function nilaicari(ByVal sDir As String) As Integer
If (countfolder(sDir) = 0) Then
For Each d In Directory.GetFiles(sDir)
z += 1

[code].....

it work fine, but i think it not effective because it process 2 time how can i make it loop, and then immediately make the progress of the looping ?

View 6 Replies

Refresh Form During Long Synchronous Operation?

Nov 13, 2009

I am running several long synchronous operations in my VB.NET application that can take several minutes each to complete. During these operations the form will turn white and the title bar will show "Not Responding" and some users may close the application thinking it has stopped working when in fact it is still running.I am pretty sure I need to multithread to do this, but my initial efforts have been unsuccessful. What is the easiest way to refresh my form every couple of seconds or so while these long operations are running?

View 4 Replies

C# :: Long Time Running Applications?

Jul 5, 2010

I'm going to design an Application (C# or VB.NET) which use .NET Framework to run for very long time. It may be restarted every year or even more...Is there anything (using special design patterns or so) which I must care about in designing "Long time running applications in .NET"?

View 3 Replies

Handling Long Running Webrequest?

Jun 29, 2009

I have a web request that can take 30-90 seconds to complete in some cases(most of the time it completed in 2-3). Currently, the software looks like it has hung if the request takes this long. I was thinking that I could use background worker to process the webrequest in a separate thread. However, The software must wait on the request to process before continuing. I know how to setup the background worker. What I am unsure about is how to handle waiting on the request to process.Do I need to create a timer to check for the results until the request times out or is processed?

View 1 Replies

Windows - Long Running Process?

Jun 2, 2011

I have a service ticket management application and users want to open several ticket details on a tab in a MDI frame. Since this application has to communicate through Web XML service with other company, it takes around 15 ~20 seconds. The users most complain is that he needs to wait until a saving process is done. Cursor is working while data is being saved and other can't be done

View 3 Replies

C# - Use For A SOA Solution To Exec A Long Running Task?

Jan 30, 2012

I am developing a solution in .Net utilising the VMWare Web Service API to create new isolated virtualised development environments. The front end will be web based. Requestors input details for the specific environment which will be persisted to SQL. So I need to write an engine of some sort to pull the data from SQL and work on the long running task of creating resource pools, switch port groups and cloning existing VM templates etc. As work progresses, events will be raised to write logs and update info back to SQL. This allows requestors to pull data back into a webpage to see how it's progressing or if it's completed.

The thing I am struggling with is how to engineer the engine which will exec the long running task of creating the environment. I cannot write a windows service (which I would like) as we work in a very secure environment and it's not possible (group policy etc). I could write a web service to execute the tasks, extending the httpRuntime executionTimeout to allow the task to complete. But I'm keen to hear what you guys think may be a better solution to use (based on .Net 3.5). The solution needs to be service oriented as we may be using it on other projects within our org. What about WWF, WCF? I have not used any of the newer technologies available since .Net 2.0 as we've only just been approved to move up from .Net 2.0.

View 2 Replies

How To Handle Long Running Process - Hang When It Run Til Half Way

Jul 6, 2012

for example:

dim a as long

for i as integer = 1 to 10000000

[CODE]..........

It will hang when it run til half way.

View 1 Replies

Redirect And Parse In Realtime Stdout Of An Long Running Process?

Apr 12, 2010

This code executes "handbrakecli" (a command line application) and places the output into a string:

Dim p As Process = New Process
p.StartInfo.FileName = "handbrakecli"
p.StartInfo.Arguments = "-i [source] -o [destination]"

[code].....

View 1 Replies

Running Multiple SQL Statements In One Operation

Apr 21, 2009

I'm trying to use ADO to create several tables at once, into MS Access. Is it possible to do multiple statements in the one operation?[code]This fails due to a "Syntax Error in CREATE TABLE statement", although each of the create statements work on their own perfectly. Is there a way of doing this sort of thing? There will also be statements to add constraints, add indexing, etc., and I'd really like to be able to do it so that I don't have to split up the string into separate parts.

View 8 Replies

Closing MDI Child Form By Checking Any Process/Operation Is Running?

Jan 4, 2012

I'm developing Applications in VB.NET 2008.

I have MDI Parent Form and i'm going load all form as MDI child. Here i'm going to give option to "Close All" toolstripbutton in top of MDI Parent to close All mdi child forms.

Now i would like to check that On click of Close All Toolstripbutton , i have to close all mdi child form but except those form is on process, example, I have opened/Loaded 5 MDI child forms within MDI Parent Form.

Child forms are ( just for example ) ,

1. Customer details Form

2. Item Details Form

3. Import Orders Form

4. Stock Details Form

5. Production Entry Form

Here 3.Import Orders form is importing from Excel with 5000 records and 4. Stock details form exporting to excel.

So now if i click "Close All" button then i have close only Idle form i.e 1,2 and 5 but i should not close 3 and 4 since its on some process.

So Is there any .NET option to check that form in process/idle or do I have to check manually by having any Flags ?

View 1 Replies

Showing A Modal Dialog Box Or Form When The Application Is Not Running In UserInteractive Mode Is Not A Valid Operation?

Sep 5, 2008

I am writing a web application using .net 3.5 and vs 2008 which allows people to add data to a db via a control panel front end.Objective: Before committing one of the fields to the db i would like the user to answer Yes, No or Cancel to confirm their action. I have tried to implement this with a modal dialog box or message box but the following error appears: Server Error in '/' Application.

View 10 Replies

Convert Date To Long Like Program?

Nov 12, 2010

In my vb code.

I am converting today date to long datatype.[code]...

View 7 Replies

Program Freezes During Long Process?

Aug 1, 2009

[code].....

View 15 Replies

VS 2005 Long A Program Runs?

Jul 22, 2010

I would like to know if there is a way to see how long a program runs. I have one that takes a very long time to run, which is not the problem. I start it and go to bed or leave for the day. When I come back it has finished. I do know it takes hours. Is there a way to find out how long it does take to run give or take a couple of minutes?

View 3 Replies

VS 2010 : Program To Save Settings To Another Program Without Running The Program That Is Being Edited?

May 5, 2012

is it possible by 1 program to save settings to another program without running the program that is being edited?

View 6 Replies

.net - How Long Dose It Take To Analysis, Design And Program A CMS Using ASP.NET

Oct 4, 2009

I intend to choose developing a Web Content Management System using asp.net with VB.net 2008 but I'm not sure about how long it takes to program such system. Is 4 months enough for developing such system? This 4 months is the duration of this semester and Includes about two months for analysis and design and the rest is left for implementation.

View 2 Replies

DB/Reporting :: Long Time To Run A VB Program And Get An Error

Apr 5, 2009

I have a problem with my (aspx.vb, aspx) program. Since my vb program require more than a day to make some data analysis. however, the page always run a long period(one hours exactly) will be downed and become cant display the page. i am wondering is it related to dns error?

View 3 Replies

Terminate Code That Takes Long In Program?

Oct 25, 2010

How to terminate function/code (not entire page) when it takes some time, for example, more than 1 sec?[code]...

I found the command "Server.ScriptTimeou", but it stops the entire page instead of one command.

View 2 Replies

Using Long File Paths To Execute A Program?

Jul 20, 2010

I am trying to execute a program with switches that ends up with a shortcut being too long and exceeds the 260 character limit for shortcuts in windows XP:

[Code]...

View 8 Replies

VS 2008 Way Of Coding In Stead Of Writting Long Long Paragraphs

Sep 18, 2011

Is there a easer way of coding in stead of wrighting long long paragraphs like this in one line [code]All of this is on one line and i got lots of info to put down.."The game will begin on your 16th birthday with your mother waking you up. Today you are to go to the castle for the first time. Leave your bed and open your dresser for a Strength Seed. "

View 2 Replies

Program Has Long Freeze While Writing Text File

Feb 26, 2012

I am making a program that loads, edits and saves 5000 rows x 100 columns of data. The data is stored in a datagridview. I use these commands to write the file:

dim z as integer
dim z1 as integer
fileopen(1,"c:drawermyfile.txt",openmode.output)
for z=0 to datagridview1.rows.count-1
[Code] .....

Every time I issue this command the whole program freezes until the computer is done writing the file. Is there some way I can get it to write this file without freezing up the program? Or, perhaps a better way to write this large data file?

View 16 Replies

Prevent Program From Running When It Is Already Running?

Jan 20, 2010

I want to prevent my program from running when it is already running.How can I do that in my vb2008 Code?

View 1 Replies

Get The Program To Start Back Over And Enter Another 2 More Words If The String Is Not 20 Characters Long

Sep 27, 2009

I have a program that requires a string. The string is 20 characters long. The string also have to be split into 2 words the first word is 12 characters and the second is 8. If the strings is not 20 characters long I get an error. I wanted to know how can I get the program to start back over and let me enter another 2 more words if the string is not 20 characters long. At the moment after I get the string is not 20 characters long error it continues to read the rest of the program but I want it to stop after an error and let me start over from the beginning.

View 3 Replies

Prevent The Operation Of More Than One Copy Of The Program At The Same Time

Feb 12, 2010

How i can prevent the operation of more than one copy of the program at the same time.

View 9 Replies

VS 2010 Program Crashes As Published Executable, Not As Program Running In Studio Or Express?

Jun 6, 2012

I wrote this VB program to be able to throw a device we developed into programming mode where we use an ATMEL Flip installer to upload new firmware. I can program one device after another running the application off of Visual Studio Express 2010 or Visual Studio 2010, but when I go to publish this file and run it on another machine, it becomes unstable and crashes after each upload. On those same computers if I run the raw unpackaged program under Visual Studio Express, the system does not crash, and I can program devices repeatedly.

View 5 Replies

Initialize Multidimensional Array By Loop Operation In Program?

Nov 14, 2011

How to initialize a multidimensional array by loop operation in VB .Net?

I have some arrays called 'Room', 'Subject', and 'Population'.[code]....

View 1 Replies

VS 2010 - Install The Program - Errors Detected During Operation

Feb 10, 2011

I've written my own program to assist other engineers with their work at my company. Some people have been able to install the program with no problems, others can't seem to get it installed and I'm having trouble figuring out why. They install .Net Framework 4 as this is the Target framework that was setup in the file, although I don't think I fully utilize all the features yet and not sure when I will. I will post the portion of the log that contains the error. If anyone decode some of this so I can track down the problem. I'm not sure if downgrading the necessary version of .Net would work or not, but didn't want to be changing that unless there was a good reason too.

PLATFORM VERSION INFO

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of V:EAUsersRCFPE Files SetupPE Files.application resulted in exception. Following failure messages were detected:
+ Exception occurred loading manifest from file PE Files.exe: the manifest may not be valid or the file could not be opened.
+ Cannot load internal manifest from component file.

ERROR DETAILS
Following errors were detected during this operation.

CODE:

View 1 Replies







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