Si no puede actualizar, abre el MDB igualmente
This commit is contained in:
parent
c0756ff258
commit
456bf102b7
27
src/main.js
27
src/main.js
|
@ -56,7 +56,7 @@ var App =
|
||||||
this.regWrites (path, 'REG_DWORD', {
|
this.regWrites (path, 'REG_DWORD', {
|
||||||
'Confirm Document Deletions' : 0,
|
'Confirm Document Deletions' : 0,
|
||||||
'Confirm Action Queries' : 0,
|
'Confirm Action Queries' : 0,
|
||||||
'Confirm Record Changes' : 0
|
'Confirm Record Changes' : 0
|
||||||
});
|
});
|
||||||
|
|
||||||
path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\Security';
|
path = 'HKCU\\Software\\Microsoft\\Office\\11.0\\Access\\Security';
|
||||||
|
@ -125,7 +125,7 @@ var App =
|
||||||
this._onEnterClick ();
|
this._onEnterClick ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this.reset ();
|
this.resetForm ();
|
||||||
},
|
},
|
||||||
|
|
||||||
createOdbc: function (dsName, driverName, params)
|
createOdbc: function (dsName, driverName, params)
|
||||||
|
@ -137,7 +137,7 @@ var App =
|
||||||
dsName, driverName, 'REG_SZ');
|
dsName, driverName, 'REG_SZ');
|
||||||
},
|
},
|
||||||
|
|
||||||
reset: function ()
|
resetForm: function ()
|
||||||
{
|
{
|
||||||
this.$('user').focus ();
|
this.$('user').focus ();
|
||||||
this.$('user').select ();
|
this.$('user').select ();
|
||||||
|
@ -247,9 +247,9 @@ var App =
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
this.clearPassword ();
|
this.regWrite (Conf.dsPath, 'PWD', '', 'REG_SZ');
|
||||||
this._disableUi (false);
|
this._disableUi (false);
|
||||||
this.reset ();
|
this.resetForm ();
|
||||||
this.showMessage (e.message);
|
this.showMessage (e.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -261,10 +261,10 @@ var App =
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (request.status !== 200)
|
if (request.status !== 200)
|
||||||
throw new Error ('Error al actualizar: '+ request.statusText);
|
throw new Error ('HTTP: '+ request.statusText);
|
||||||
|
|
||||||
if (this.fso.fileExists (this.compressFile))
|
if (this.fso.fileExists (this.compressFile))
|
||||||
this.fso.deleteFile (this.compressFile);
|
this.fso.deleteFile (this.compressFile);
|
||||||
|
|
||||||
var stream = new ActiveXObject ('ADODB.Stream');
|
var stream = new ActiveXObject ('ADODB.Stream');
|
||||||
stream.open ();
|
stream.open ();
|
||||||
|
@ -303,21 +303,16 @@ var App =
|
||||||
this.fso.moveFile (oldMdb, this.mdbFile);
|
this.fso.moveFile (oldMdb, this.mdbFile);
|
||||||
|
|
||||||
// XXX: End
|
// XXX: End
|
||||||
|
|
||||||
this.openMdb ();
|
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
this.clearPassword ();
|
alert ('Error al actualizar: '+ e.message);
|
||||||
this.showMessage (e.message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._disableUi (false);
|
this._disableUi (false);
|
||||||
},
|
|
||||||
|
if (this.fso.fileExists (this.mdbFile))
|
||||||
clearPassword: function ()
|
this.openMdb ();
|
||||||
{
|
|
||||||
this.regWrite (Conf.dsPath, 'PWD', '', 'REG_SZ');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
openMdb: function ()
|
openMdb: function ()
|
||||||
|
|
Loading…
Reference in New Issue