Updating sqltest to the latest API.

Not part of build.
This commit is contained in:
varga%netscape.com 2003-07-08 20:38:33 +00:00
Родитель 32f3fd3d64
Коммит adc5c485ed
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1,4 +1,4 @@
const alias = "urn:aliases:sqltest"; const aliasName = "sqltest";
const complete = Components.interfaces.mozISqlRequest.STATUS_COMPLETE; const complete = Components.interfaces.mozISqlRequest.STATUS_COMPLETE;
var connection; var connection;
@ -53,7 +53,8 @@ function init() {
var service = Components.classes["@mozilla.org/sql/service;1"] var service = Components.classes["@mozilla.org/sql/service;1"]
.getService(Components.interfaces.mozISqlService); .getService(Components.interfaces.mozISqlService);
if (!service.hasAlias(alias)) { var alias = service.getAlias(aliasName);
if (!alias) {
alert("The alias for the sqltest was not defined."); alert("The alias for the sqltest was not defined.");
return; return;
} }