javascript - Why is rowsAffected not returning an integer -


I am calling execution SQL statement for SQLite on iOS. I'm using success [and error] callback methods so that I can confirm my records affecting numbers.

When it comes back, it gets 3 well defined variables, but when I try

it is in a mascara service ...

here's my code:

  $ DBService.ExecuteQuery (script, the ultimate function (insertId, rowsAffected, rows) {window.logger.logIt ( "rowsAffected:" + rowsAffected.toString ()); if (RowsAffected == 1) {Deferredkreject ( "record failed to update. question 1 record has not been affected");} else {Deferredkresolve ();}}, function (error) { deferred.reject ("Failed to update record." + T Ti. Message);});   

When I break into the debugger and hover over rowsAffected variable, it does appear as if it is a property of a class, where it shows: insertId, rowsAffected = 1 , And the rows. These success callbacks have 3 parameters. When I'm just walking around the rows, why is all this 3? Also, when I write my console window (window.logger.logIt ()), it displays it as [object object] then, which tells me that it's the class property (or only in my class) One variable), instead it is a class, thinks

Can anyone tell me what is happening here?

docs clearly as the state:

executeSql ( ) The method invokes your callback simultaneously as a logic in the form of SQLResultSet object .

Therefore the argument given to callback is one object with three distinct properties, always trust DevTools.

So, it should be more:

  $ DBService.ExecuteQuery (script, parameters, function (resultSetObj) {... if (resultSetObj .rowsAffected! == 1) {...    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -