var _db = require("topsin.database");
require("topsin.error");
_db.addConnection({
    database_type: _db.DbType.mssql,
    database_host: '114.95.32.229,21433',
    database_name: 'pcb_biz',
    database_user: 'dlzyc',
    database_pwd: 'Dl1117*/*'
}, "SOURCE_DB");

try {
    var r = _db.query("SOURCE_DB", function(query){
        var r = query.selectValue("SELECT 1", {});
        if (query.lastError().isValid()) {
            throw query.lastError().text();
        }
        return r;
    });
    print(r);
} catch(e) {
    print("error: ", e);
}
