Talk:POS - Backup MySQL Database
I have tried tis coding bt some how when i try to excute the backup button it has error
Tis is My Script.Backup in resources panel
int n = javax.swing.JOptionPane.showConfirmDialog(
null, "Please connect your Flash Drive then press OK.", "Openbravo POS Backup", JOptionPane.OK_CANCEL_OPTION);
if (n == 0) { Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("cmd \C start C:\Program Files\openbravopos-2.30\backup.bat"); }else{ return; }
When i excute the button it gives me this error
com.openbravo.pos.scripting.ScriptException: Sourced file: inline evaluation of: ``int n = javax.swing.JOptionPane.showConfirmDialog( null, "Please connect . . . Token Parsing Error: Lexical error at line 9, column 35. Encountered: "C" (67), after : "\"cmd \\"
bsh.EvalError: Sourced file: inline evaluation of: ``int n = javax.swing.JOptionPane.showConfirmDialog( null, "Please connect . . . Token Parsing Error: Lexical error at line 9, column 35. Encountered: "C" (67), after : "\"cmd \\"
What i can understand is it cant excess the Backup.Bat, bt if i change this line ("cmd \C start C:\Program Files\openbravopos-2.30\backup.bat"); to ("cmd /C start C:/Program Files/openbravopos-2.30/backup.bat");
It says windows cannot find 'C:/Program'. Make sure you typed the name correctly, and try again.
Im using MySql and im tryin to backup my database . Can sumone help me.