TheWizardofInt Posted June 19, 2006 Posted June 19, 2006 The command line is: "C:\progra~1\sybase\sql anywhere 8\ dbeng8 c:\progra~1\sybase\shared\hademo\hammdemo.db" So I tried: Proc.StartInfo.FileName = "C:\Program Files\Sybase\SQL Anywhere 8\win32\dbeng.exe" Proc.StartInfo.Arguments = "c:\program files\sybase\shared\hademo\hammdemo.db" Proc.Start() Which gives a file not found error. Can a fresh set of eyes see where I missed this? Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
nbrege Posted June 19, 2006 Posted June 19, 2006 Proc.StartInfo.FileName = "C:\Program Files\Sybase\SQL Anywhere 8\win32\dbeng.exe" You have a "win32" in your .StartInfo line that's not in your command line. Could that be the problem? Also, is the filename "dbeng.exe" or "dbeng8.exe"? Quote
joe_pool_is Posted June 19, 2006 Posted June 19, 2006 What about the special character '\'? In C++, it needs to be preceded by a special character '\'. So, your string would look like, "C:\\Program Files\\Sybase\\SQL ..." Not sure what language you are in; hope that helps. Quote Avoid Sears Home Improvement
Leaders snarfblam Posted June 19, 2006 Leaders Posted June 19, 2006 Guessing by the lack of semi-colons, I'd say VB, in which case the escaped backslashes would not be required. Quote [sIGPIC]e[/sIGPIC]
TheWizardofInt Posted June 20, 2006 Author Posted June 20, 2006 You have a "win32" in your .StartInfo line that's not in your command line. Could that be the problem? Also' date=' is the filename "dbeng.exe" or "dbeng8.exe"?[/quote'] From the command prompt, you don'[t have to go all the way to Win32 to execute the program, however it IS dbeng8.exe, which you caught. The actual method to open the program: Dim Proc As New Process Proc.StartInfo.FileName = "C:\Progra~1\Sybase\SQL Anywhere 8\win32\dbeng8.exe" Proc.StartInfo.Arguments = "c:\progra~1\sybase\shared\hademo\hammdemo.db" Proc.Start() [/Code] Thanks everyone - I knew this needed a fresh set of eyes Quote Read the Fovean Chronicles Because you just can't spend your whole day programming!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.