473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

wait for exit

(is an application window)
the following code does not wait 'til termination of the process ,why?
(is trying to run dbvalid on a sybase Database)
TIA

Dim errnumReturned As Integer = -999
Dim Exe_DBvalid As String = "d:\zoz\asa\win32\dbvalid.exe" '??test
remove d:\sos
Dim oProcess_DBvalid As New System.Diagnostics.Process
Dim oCmdLine As New System.Diagnostics.ProcessStartInfo
oCmdLine.FileName = Exe_DBvalid
oCmdLine.Arguments = " """"-o dbvalid.txt"""" """"-c
uid=zoz;pwd=xx;dsn=sosdata"""" """"-f"""" "
oCmdLine.UseShellExecute = True
Try
oProcess_DBvalid.Start(oCmdLine)
Catch ex As Exception
errnumReturned = -998
End Try
oProcess_DBvalid.WaitForExit()
errnumReturned = oProcess_DBvalid.ExitCode()
oProcess_DBvalid.Dispose()
Nov 21 '05 #1
0 749

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

Similar topics

1
by: Mark McEahern | last post by:
Is there a straightforward way to get the exit code from a windows process? I want to write a script that runs a bunch of .sql files against SQL Server using osql. I want it to stop if there's...
2
by: Ishwar Rattan | last post by:
Here is a piece code (according to blurb on os.wait, the lower order 7 bits of exit status of process should contain the signal number of signal that terminated the process..) and signal number...
9
by: Roger Down | last post by:
Lets say I have a method UpdateCache() called from a single thread. I also have a method GetCache() called from multiple threads. When UpdateCache() is called, the cache updating is being...
11
by: Michi Henning | last post by:
Hi, I'm calling Monitor.Wait() from a console event handler. It's not working -- the call to Wait() immediately causes the process to exit. Is it impossible for some reason to call Wait() from...
11
by: Peter Steele | last post by:
I have a Windows application written in C# that I want to return a non-zero exit code when it it run. The problem is that as a Windows application, there doesn't seem to be a way to control this....
4
by: Terry Olsen | last post by:
I have loop that calls a Sub that runs the following code: Dim WinZip As System.Diagnostics.Process Dim args As String = " -Pru -ex " & lblFolder.Text & "\" & PCName & ".zip @""" & appPth &...
12
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock...
3
by: RedWiz | last post by:
Hi i have to develop a multihreaded php application on linux, then through pcntl_fork and wait. I tried it, but there something going wrong, i think. The difference whit other languages like c...
8
by: TxAg03 | last post by:
I ran an outside program that launched another program. I created a process for the launcher program and waited for that to exit, but what I need is to have it wait for the 2nd program to exit. ...
1
by: MessyHeart | last post by:
The documentation on MSDN for the overloaded Monitor.wait(object,timespan, bool) is: public static bool Wait( Object obj, TimeSpan timeout, bool exitContext ) Releases the lock...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.