Process Start to Start Sybase

TheWizardofInt

Junior Contributor
Joined
Dec 31, 1969
Messages
333
Location
Orlando, FL
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?
 
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"?
 
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.
 
Guessing by the lack of semi-colons, I'd say VB, in which case the escaped backslashes would not be required.
 
nbrege said:
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"?

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:

Code:
 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()

Thanks everyone - I knew this needed a fresh set of eyes
 
Back
Top