Problem executing an external program

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Problem executing an external program

Postby dmacqueen » Wed May 13, 2009 12:12 pm

I am trying to use WbApplication>>execute:onError:onExit: to run an export program, specifically mysqldump. The command line I passed to it would run fine when pasted into a DOS box in the same directory as the image, but would not run using execute:onError:onExit:. After several hours of messing about rearranging the command line, I got the same command line to work in both places. Now I am having similar difficulties with mysqlimport -- it works fine in a DOS box does not work at all (nothing happens, but the call returns normally) from a workspace in an image.

Why should they produce different results? Anything else I can try?

TIA,

Donald [|]
dmacqueen
[|]
 
Posts: 27
Joined: Fri Nov 02, 2007 3:40 pm

Re: Problem executing an external program

Postby dmacqueen » Wed May 13, 2009 1:09 pm

I am trying to execute these two commands:

1) mysql -u user -ppassword dbname < "c:\documents and settings\Jas\archive.dmp"

2) mysqlimport -u user -ppassword --local dbname dumpOfOneTable.dmp

Both work from a command line; neither works from an image.

It took me most of yesterday to get this to work both ways:

mysqldump -u user -ppassword --result-file="c:\documents and settings\Jas\archive.dmp" dbname --tables "TABLE1" "TABLE2"

Grrrrr . . .
dmacqueen
[|]
 
Posts: 27
Joined: Fri Nov 02, 2007 3:40 pm

Re: Problem executing an external program

Postby tc » Wed May 13, 2009 8:19 pm

Hello,

Would it be possible to put the mysql commands in a batch file and run the batch file using the same method (command /c xxx.bat)?

Also, can you post how the method call looks (method and arguments when you call it)?

Thanks.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest