how to pass arguments to PhoneGap database transaction executeSql functions

po3

New Member
I'm new to PhoneGap I'm using database and its working fine with below code \[code\]db = window.openDatabase("Sample", "1.0", "PhoneGap Demo", 200000); db.transaction(getDetails, transaction_error);function transaction_error(tx, error) { $('#busy').hide(); alert("Database Error: " + error);}function getUserDetails(tx) {var sql = "select id, Name, DisplayName from details where Name=Name"; try { tx.executeSql(sql, [],getList_success); } catch(err) { alert(err); }}function getList_success(tx, results){ var len = results.rows.length; for(var i=0; i <len; i++) { //Some code goes here } db = null;}\[/code\]Now i want to use the functions \[code\]getUserDetails\[/code\] and \[code\]getList_success\[/code\] by passing paramenters, i tried the below code its giving error\[code\]db = window.openDatabase("Sample", "1.0", "PhoneGap Demo", 200000); getUserDetails(db);function getUserDetails(tx) {var sql = "select id, Name, DisplayName from details where Name=Name"; try { tx.executeSql(sql, [],getList_success); } catch(err) { alert(err); }}\[/code\]the error is \[code\]TypeError:'undefined' is not a function\[/code\] in the catch block, can any one help me to get through this?. Thanks in advance
 
Back
Top