473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Batch processing in C#

Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig
Feb 1 '08 #1
3 6358
On 1 Feb, 09:48, ludwig_stu...@h otmail.com wrote:
Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig
you mean how to run a batch file?this code below will run a system
command:
{
ProcessStartInf o psiOpt = new ProcessStartInf o(@"cmd.exe", @"/c dir");
psiOpt.WindowSt yle = ProcessWindowSt yle.Normal;
psiOpt.Redirect StandardOutput = true;
psiOpt.UseShell Execute = false;
psiOpt.CreateNo Window = true;
// Create the actual process object
Process procCommand = Process.Start(p siOpt);
// Receives the output of the Command Prompt
StreamReader srIncoming = procCommand.Sta ndardOutput;
// Show the result
MessageBox.Show (srIncoming.Rea dToEnd());
// Close the process
procCommand.Wai tForExit();
}
Feb 1 '08 #2
Hi,

As mentioned by NoLogo, you could invoke the Command Shell to run the .BAT
file. Apart of that if you are interested to execute some functions as a
sequence of processes, you could try that with the Threading mechanism.

Thus, try to mention your requirement in more detail.

HTH

<lu***********@ hotmail.comwrot e in message
news:09******** *************** ***********@e4g 2000hsg.googleg roups.com...
Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig
Feb 1 '08 #3
On 1 feb, 11:38, "DSK Chakravarthy" <dskch...@msn.c omwrote:
Hi,

As mentioned by NoLogo, you could invoke the Command Shell to run the .BAT
file. Apart of that if you are interested to execute some functions as a
sequence of processes, you could try that with the Threading mechanism.

Thus, try to mention your requirement in more detail.

HTH

<ludwig_stu...@ hotmail.comwrot e in message

news:09******** *************** ***********@e4g 2000hsg.googleg roups.com...
Hi,
does someone has some links to information about how I would approach
and implement batch processing in C#?
Thanks!
Kind regards,
Ludwig- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -
Yes, you are right. I will ask for more information first, to see what
the lcient really wants.
Feb 3 '08 #4

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

Similar topics

3
17741
by: DBA | last post by:
I have a windows batch file that executes a SQL Server bcp command. I would like to obtain a return code if the bcp command fails. However, I cannot seem to find the return code (if any) for bcp. For example, if the bcp command is improperly formatted, or has a bad password, I want the batch file to return an error. Right now, my batch file simply executes and returns success, even when the bcp command fails. Has anyone run into this...
2
6562
by: Paul Reddin | last post by:
Hi, (V8.1 Fp2) Our application uses JDBC batch to execute mutiple insert statements and we saw a strange thing this morning. There were 4 SQL Insert statements in the batch, and we know the 2nd would have violated a Unique Constraint and failed, but the SQL error returned was related to the 3rd statement (which had a FK dependent on the 2nd
13
1509
by: guy | last post by:
Hi, I'm running a batch test using a C# program. This often takes several hours to run and iterates over a bunch of parameters (say) 1000 times. The processor is maxed out during this time. I'd like to provide a button that cancels the batch test when it is partially done.
2
5257
by: | last post by:
Hi, I have just started using MSSQL and the DOS environment at work. I have a lot of experience with Sybase and the UNIX environment, but this is a whole new ball of wax. I'd like to use osql from a batch file to log into the dataserver and run a fairly long list of SQL and then exit. I don't want to have a bunch of SQL files sitting around that I have to use the -i option to run, and I'd rather not create temporary SQL files like...
1
3766
by: Crash | last post by:
Hi, ..NET v1.x SP1 VS 2003 SQL Server 2000 SP3 Server 2000, XP, Server 2003 I would like to programmatically execute {possibly many} SQL Server batch scripts. Aka I have many scripts that drop/add stored procedure definitions, alter table definitions & constraints, etc... and I would
4
18696
by: acantatore | last post by:
Hello! I'm looking for patterns, best practices, examples - reference material - that apply to Batch Processing, that is: Basic job control (start and stop) Job partitioning Parallel processing and distribution Fine-grained transaction control Error handling
16
2748
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on screen appearance of the Select List grows for the first 5 rows then the scroll bar appears if there's more). So far so good. . . The problem is that none of the rows I'm inserting appear on the screen until I have RETURNed from my function; so If...
6
2003
by: Thomas Guettler | last post by:
Hi, I tried PIL for image batch processing. But somehow I don't like it - Font-Selection: You need to give the name of the font file. - Drawing on an image needs a different object that pasting and saving. - The handbook is from Dec. 2006. What image libraries do you suggest? I think there are these alternatives:
3
6723
by: John | last post by:
Hi. I have a number of batch jobs that are ran nightly on our Windows 2000 based Oracle 8.1.7 (soon to be 9i) server. I have these designed just right, so the Windows Scheduled Tasks runs them and then a parser goes through the output and, in case of errors, sends me a page... The database is our financial system which requires users to login using Oracle based user ID / Password.
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.