this is my code:
var db = require('/QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/lib/db2a');
pjs.defineDisplay("display", "dericktest3.json");
function derickTest3() {
var DBname = '*LOCAL';
var userId = '********';
var passwd = '**********';
var data1 = ['test0','test1','test2'];
var sql = "SELECT NAME, DESCRIPTION FROM OBMENHDS.SFBLDGP";
var dbconn = new db.dbconn();
var connect = pjs.fiber.wrap(dbconn.conn,dbconn);
connect (DBname, userId, passwd);
var stmt = new db.dbstmt(dbconn);
var sqlexec = pjs.fiber.wrap(stmt.exec,stmt);
while (!btnexit) {
var data2 = sqlexec(sql);
name = JSON.stringify(data2);
stmt.close();
dbconn.disconn();
dbconn.close();
display.screen1.execute();
}
}
exports.run = derickTest3;
It is giving me the following error: "This fiber is already running"
does anybody know how to fix this issue?
use of db2a to connect to db2 database
-
- New User
- Posts: 2
- Joined: Thu Oct 19, 2017 1:17 pm
- First Name: Derick
- Last Name: Castillo
- Company Name: Brunswick
- Contact:
Who is online
Users browsing this forum: No registered users and 1 guest