View source | View content page | Page history | Printable version   

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.

Retrieved from "http://wiki.openbravo.com/wiki/Talk:POS_-_Backup_MySQL_Database"

This page has been accessed 4,040 times. This page was last modified on 9 December 2010, at 10:19. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.