Si no puede actualizar, abre el MDB igualmente

This commit is contained in:
Juan Ferrer Toribio 2016-04-14 15:16:19 +02:00
parent c0756ff258
commit 456bf102b7
1 changed files with 11 additions and 16 deletions

View File

@ -56,7 +56,7 @@ var App =
this.regWrites (path, 'REG_DWORD', {
'Confirm Document Deletions' : 0,
'Confirm Action Queries' : 0,
'Confirm Record Changes' : 0
'Confirm Record Changes' : 0
});
path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\Security';
@ -125,7 +125,7 @@ var App =
this._onEnterClick ();
}
else
this.reset ();
this.resetForm ();
},
createOdbc: function (dsName, driverName, params)
@ -137,7 +137,7 @@ var App =
dsName, driverName, 'REG_SZ');
},
reset: function ()
resetForm: function ()
{
this.$('user').focus ();
this.$('user').select ();
@ -247,9 +247,9 @@ var App =
}
catch (e)
{
this.clearPassword ();
this.regWrite (Conf.dsPath, 'PWD', '', 'REG_SZ');
this._disableUi (false);
this.reset ();
this.resetForm ();
this.showMessage (e.message);
}
},
@ -261,10 +261,10 @@ var App =
try {
if (request.status !== 200)
throw new Error ('Error al actualizar: '+ request.statusText);
throw new Error ('HTTP: '+ request.statusText);
if (this.fso.fileExists (this.compressFile))
this.fso.deleteFile (this.compressFile);
this.fso.deleteFile (this.compressFile);
var stream = new ActiveXObject ('ADODB.Stream');
stream.open ();
@ -303,21 +303,16 @@ var App =
this.fso.moveFile (oldMdb, this.mdbFile);
// XXX: End
this.openMdb ();
}
catch (e)
{
this.clearPassword ();
this.showMessage (e.message);
alert ('Error al actualizar: '+ e.message);
}
this._disableUi (false);
},
clearPassword: function ()
{
this.regWrite (Conf.dsPath, 'PWD', '', 'REG_SZ');
if (this.fso.fileExists (this.mdbFile))
this.openMdb ();
},
openMdb: function ()