Maybe the "second console" application never stops running? Is there a way that I can tell if the "second console" application ever stops running? If so, how can I tell when the "second console" application has finished executing?
Basically the second console application calls a web service to obtain information. The "second" console application has a proxy in it to communicate with the web service.
There is an 'xsd' file that communicates with the web services via xml. Do proxies always keep running?
You should forget about using Process.Start for the moment and make sure that you understand how the second application behaves when run manually in a command window.
Hopefully after typing in the correct command line, the application will run and then exit. If the running application requires user interaction, e.g. "Press a key to exit", then it may be a poor candidate for automation via Process.Start.
If the manual run is ok can you post the code used to initialise the Process object.
I want to make the following comments:
1. When I stepped through the code using a visual studio.net 2008 debugger, the application did finish executing when the main procedure finished executing. Basically there was no where for me to step through the code again.
However the debugger was still active and ready to continue debugging.
Does this the application is still executing?
2. As far as I can tell, the application runs fine from the dos window. It does not ask me to enter any information. Does that mean it has finished executing?
How should be used these objects,
- do I have to create an object every time in an using block
(creating connection every time I need a query)
- I can create the object globally and reused for every query I need? Will the server close this connection if it is idle, and I will have an exception when trying to reuse it?
What do you mean by using delegates. To create some functions where I open the connection with using ?
Sorry, I didn't told the truth, I mixed it up with something completely different. The SqlConnection is threadsave. Therefore no delegates aren't needed. I used some other communication at the same time and this wasn't threadsafe, so delegates were needed.
I Develop an application with main form (MDI Form) and all child forms opened in the same form, but my problem is when open the application the windows task bar doesn't show until i minimize or close the application.
please help me if you can who to show the windows task bar in the same time when my application is opened.
If you have a Windows Form application here, it means one of two things - one, the taskbar is set to autohide, or two, you have code in the application that's designed to run the application full screen.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
Are you properly setting the MDiParent property of each child window to 'true ? Once you have set that property: the setting of 'ShowInTaskBar for MdiChild Forms has no effect.
See Pete O'Hanlon's reply above for other things you should check on.
And, also, if you are using Windows 7, there have been many bug reports to Microsoft about the Main TaskBar stuck on Visible, and not hiding, when its AutoHide property is set to false: I have this problem, at times myself, and have reported it: but I have never heard of anyone having a problem where the Main TaskBar was "stuck" on "closed."
<color>"When it comes to atoms, language can be used only as in poetry. The poet, too, is not nearly so concerned with describing facts as with creating images." Niels Bohr
Some One Plz Help Me
When i Am trying to Restore a database it gives me error-
System.Data.SqlClient.SqlException: Logical file DB_Jaggry isnot part ofdatabase DB_Jaggry_Restore&. UseRESTORE FILELISTONLY to list the logical file names.
RESTOREDATABASEis terminating abnormally
privatevoid button1_Click(object sender, EventArgs e)
Code fro Backup-
publicstaticvoid BackupDB(string backupDestinationFilePath)
// Console.WriteLine("Backup operation started");
Backup backup = new Backup();
//Set type of backup to be performed to database
backup.Action = BackupActionType.Database;
backup.BackupSetDescription = "BackupDataBase description";
//Set the name used to identify a particular backup set.
backup.BackupSetName = "Backup";
//specify the name of the database to back up
backup.Database = "DB_Jaggry";
//Set up the backup device to use filesystem.
BackupDeviceItem deviceItem = new BackupDeviceItem(
// Setup a new connection to the data server
ServerConnection connection = new ServerConnection();
Server sqlServer = new Server(@"SNEHA-PC\SQLEXPRESS");
//Initialize devices associated with a backup operation.
backup.Initialize = true;
backup.Checksum = true;
backup.ContinueAfterError = true;
backup.LogTruncation = BackupTruncateLogType.Truncate;
MessageBox.Show("Backup operation succeeded");
catch (Exception ex)
//Console.WriteLine("Backup operation failed");// Console.WriteLine(ex.Message);
Code For Restore-publicstaticvoid RestoreDB(string backUpFilePath, string databaseName)
Restore restore = new Restore();
restore.Database = databaseName;
restore.Action = RestoreActionType.Database;
restore.ReplaceDatabase = true;
restore.NoRecovery = false;
ServerConnection connection = new ServerConnection(@"SNEHA-PC\SQLEXPRESS");
Server sqlServer = new Server(connection);
MessageBox.Show("Restore operation succeeded");
catch (Exception ex)
Thnk u In Advance...
Last Visit: 31-Dec-99 19:00 Last Update: 1-Dec-21 14:56