Click here to Skip to main content
15,886,026 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Method signature does not match delegate - thread safe Pin
Alan N2-May-13 12:26
Alan N2-May-13 12:26 
QuestionTrouble passing arguments to System.Diagnostics.Process.Start Pin
savedlema2-May-13 0:07
savedlema2-May-13 0:07 
AnswerRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Richard MacCutchan2-May-13 1:07
mveRichard MacCutchan2-May-13 1:07 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Richard Deeming2-May-13 1:23
mveRichard Deeming2-May-13 1:23 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Richard MacCutchan2-May-13 1:27
mveRichard MacCutchan2-May-13 1:27 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
savedlema2-May-13 8:06
savedlema2-May-13 8:06 
AnswerRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Eddy Vluggen2-May-13 5:07
professionalEddy Vluggen2-May-13 5:07 
AnswerRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Alan N2-May-13 5:44
Alan N2-May-13 5:44 
savedlema wrote:
Please remember that, if I take the contents of txtProgram.text and txtArguments.text and put them to a command prompt, it works fine.


You are writing the output of mysqldump into a file using the redirection operator >. This is implemented by the command processor, cmd.exe and to get the same effect using Process.Start the various bits should be

Process.Start ( Environment.GetEnvironmentVariable("COMSPEC"),
  "/c ""C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump.exe"" --user=root --password=mypassword --host=localhost --port=3306 --database sakila > ""C:\backup\sakilabackup.sql""")


Environment.GetEnvironmentVariable("COMSPEC") resolves to the path of the command processor and is convenient way of locating that program on any system. The arguments are now the command line you would have typed at the prompt, prefixed by /c to tell the command processor to exit once mysqldump has ended. Check all the quotes as I may have these wrong, VB isn't my usual language.

One thing to watch out for when using Process.Start is the working directory. If this needs setting then you should create a ProcessStartInfo object and use the correct overload of Process.Start.

Alan.
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
savedlema2-May-13 8:01
savedlema2-May-13 8:01 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Alan N2-May-13 8:17
Alan N2-May-13 8:17 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
savedlema3-May-13 0:54
savedlema3-May-13 0:54 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
Alan N3-May-13 2:57
Alan N3-May-13 2:57 
GeneralRe: Trouble passing arguments to System.Diagnostics.Process.Start Pin
savedlema3-May-13 4:24
savedlema3-May-13 4:24 
QuestionWord VBA: quickly checking if table is uniform from 3rd row on Pin
Bart Van Eyndhoven1-May-13 23:08
Bart Van Eyndhoven1-May-13 23:08 
AnswerRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
Kenneth Haugland2-May-13 2:28
mvaKenneth Haugland2-May-13 2:28 
QuestionRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
Kenneth Haugland2-May-13 2:37
mvaKenneth Haugland2-May-13 2:37 
AnswerRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
Bart Van Eyndhoven2-May-13 4:23
Bart Van Eyndhoven2-May-13 4:23 
GeneralRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
Kenneth Haugland2-May-13 4:54
mvaKenneth Haugland2-May-13 4:54 
GeneralRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
Bart Van Eyndhoven2-May-13 21:51
Bart Van Eyndhoven2-May-13 21:51 
AnswerRe: Word VBA: quickly checking if table is uniform from 3rd row on Pin
TnTinMn4-May-13 5:33
TnTinMn4-May-13 5:33 
QuestionVB Macro one sheet is corrupt Pin
saurabhrahulsharma1-May-13 16:59
saurabhrahulsharma1-May-13 16:59 
AnswerRe: VB Macro one sheet is corrupt Pin
JR2121-May-13 20:31
JR2121-May-13 20:31 
AnswerRe: VB Macro one sheet is corrupt Pin
Kenneth Haugland2-May-13 1:24
mvaKenneth Haugland2-May-13 1:24 
QuestionHow can i Change Button Label Value Randomly in VIRTUAL KEYBOARD ??? Pin
Vivek1987agarwal1-May-13 10:03
Vivek1987agarwal1-May-13 10:03 
AnswerRe: How can i Change Button Label Value Randomly in VIRTUAL KEYBOARD ??? Pin
dusty_dex1-May-13 11:24
dusty_dex1-May-13 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.