Android Question [SOLVED] jRDC Update Date Field in MySQL

mmieher

Active Member
Licensed User
Longtime User
Trying to update a remote MySql date field from jRDC. No errors. Just no update.

I did not change anything in B4j jRDC example except config.properties.

config.properties:
...
sql.UpdateLogin=UPDATE userinfo SET nSignOns = ?, lastaccess = NOW() WHERE username = ?

B4A stuff:
B4X:
            dbCmd.name = "UpdateLogin"
            dbCmd.Parameters = Array As Object(LogonCount,UserID)

LogonCount is Int
UserID is string

I tried to pass a datetime ('2018-11-09 12:30:15') from App at first, but that was not working. Boned up on MySql and discovered NOW() function.

Clueless as to what is the problem.
 

OliverA

Expert
Licensed User
Longtime User
Just no update.
If you have the correct DB configured in config.properties and table userinfo exists, then I’m going to guess that the update query cannot find anything to update according to the where clause, meaning it can’t find the username you are passing.
 
Upvote 0
Top