You can use the following function to execute a query-
getQueryResult: This function will give results object with data obtained from DataQuery,
in case of success functionSuccessObj will be called. In case of failure functionErrorObj.
getQueryResult:function(functionSuccessObj,functionErrorObj,dataQuery){
var dbObj=FOSSencha.util.AtosSQLProxy.getdatabaseObj();
dbObj.transaction(getQueryResultQueryDB, getQueryResultErrorCB);
function getQueryResultQueryDB(tx) {
tx.executeSql(dataQuery, [], getQueryResultQuerySuccess, getQueryResultErrorCB);
}
// Query the success callback
function getQueryResultQuerySuccess(tx, results) {
//return the callback function with result
functionSuccessObj(results);
}
function getQueryResultErrorCB(err) {
functionErrorObj(err);
}
}
—————————————————-
Posted By :
Manish Kumar Choithani
Senior /Lead Architect
Reference Email Ids:
[email protected]
[email protected]
[email protected]
[email protected]
getQueryResult: This function will give results object with data obtained from DataQuery,
in case of success functionSuccessObj will be called. In case of failure functionErrorObj.
getQueryResult:function(functionSuccessObj,functionErrorObj,dataQuery){
var dbObj=FOSSencha.util.AtosSQLProxy.getdatabaseObj();
dbObj.transaction(getQueryResultQueryDB, getQueryResultErrorCB);
function getQueryResultQueryDB(tx) {
tx.executeSql(dataQuery, [], getQueryResultQuerySuccess, getQueryResultErrorCB);
}
// Query the success callback
function getQueryResultQuerySuccess(tx, results) {
//return the callback function with result
functionSuccessObj(results);
}
function getQueryResultErrorCB(err) {
functionErrorObj(err);
}
}
—————————————————-
Posted By :
Manish Kumar Choithani
Senior /Lead Architect
Reference Email Ids:
[email protected]
[email protected]
[email protected]
[email protected]