gen.Initialize(DBUtils.ExecuteJSON(SQL1, "SELECT * from dataset", Null, 0,Array As String(DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_TEXT,DBUtils.DB_INTEGER,DBUtils.DB_TEXT,DBUtils.DB_TEXT,DBUtils.DB_INTEGER,DBUtils.DB_TEXT,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER, DBUtils.DB_INTEGER,DBUtils.DB_TEXT,DBUtils.DB_TEXT,DBUtils.DB_TEXT,DBUtils.DB_TEXT, DBUtils.DB_TEXT,DBUtils.DB_TEXT,DBUtils.DB_INTEGER,DBUtils.DB_INTEGER)))
JSONString_dataset = gen.ToPrettyString(4)
'Msgbox(JSONString, "")
'--- extract settings from localdb
Dim gen As JSONGenerator 'Requires a reference to the JSON library.
gen.Initialize(DBUtils.ExecuteJSON(SQL1, "SELECT * from settings", Null, 0, Array As String(DBUtils.DB_TEXT,DBUtils.DB_TEXT)))
JSONString_settings = gen.ToPrettyString(4)
json_submit.Initialize("json_submit", Me)
ProgressDialogShow("-- Submitting Data --")
log_entry("post_data: JSONString_dataset: " & JSONString_settings)
json_submit.PostString(server_path & "fuseapi.php","action=submit&device_id="&GetDeviceId&"&dataset=" & JSONString_dataset & "&settings=" & JSONString_settings)
' after successful post, we show message and then clear localdb data