Commit 8b5c5c40 authored by Leon's avatar Leon

upload.

parent 3a62b8d7
var _db = require("topsin.database");
var _error = require("topsin.error");
try {
var DEMO_CONN = "DEMO_CONN";
_db.addConnection({
database_type: "mssql",
database_host: "139.196.104.13",
database_name: "DB_PCB_LDI_History_Report",
database_user: "sa",
database_pwd: "TopLinker0510"
}, DEMO_CONN);
var query = _db.query(DEMO_CONN);
var sql = " \
select base64 \
from HistoryFiducials \
cross apply (select Image as '*' for xml path('')) T (base64) \
where ExposureFK = '12159' \
";
var data = query.selectArrayMap(sql, {});
if (query.lastError().isValid()) {
throw query.lastError().text();
}
print(data.length);
print("To Base64: ", JSON.stringify(data));
sql = " \
SELECT * \
FROM HistoryFiducials WHERE ExposureFK = '12159' \
";
data = query.selectArrayMap(sql, {});
if (query.lastError().isValid()) {
throw query.lastError().text();
}
print("Normal: ", JSON.stringify(data));
} catch (e) {
print(e)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment