How can I send an array from the server and follow a varchar in the same object?
Code: Select all
try{
ISFSArray arr = dbmanager.executeQuery(sql,
new Object[] {});
if (arr.size() > 0)
{
SFSObject result = new SFSObject();
result.putSFSArray("success", arr);
send("returnchat", result, user);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = new Date();
dateFormat.format(date);
SFSObject result2 = new SFSObject();
result2.putUtfString("success", dateFormat.format(date));
send("returnchat", result2, user);
}
}catch (SQLException e) {
ISFSObject error = new SFSObject();
error.putUtfString("error", "MySQL update error");
send("returnchat" , error, user);
e.printStackTrace();
trace(e.toString());
}
Yours sincerely