我已经在swift中以编程方式创建了var sql = 'SELECT DPHID FROM DPH';
var sqlParam = [];
db.transaction(
function queryDB(tx) {
tx.executeSql(sql, sqlParam,
function querySuccess(tx, results) {
console.log(JSON.stringify(results.rows));
... call other function ...
}
, error);
}
, error);
function error(tx, err) {
console.log("Error");
console.log(JSON.stringify(tx));
console.log(JSON.stringify(err));
}
,但它给了我以下错误:
Class'ViewController'没有初始值设定项
代码:
UILabel
答案 0 :(得分:9)
将let lbl_LastName: UILabel!
更改为var lbl_LastName: UILabel!