Android Question using JSON to send data from SQLite to server

RhodesB4A

Member
Licensed User
Longtime User
Hi,

I've been looking for an example on how to retrieve data from SQLite DB (especially and image) and send it across to a server. Retrieving data from SQLite DB I can do but i'm not sure of how to begin the process preparing of sending data across using JSON GENERATOR and also converting image to base64. Basically this is where I'm stuck;

'.. other code is here
Main.cur = Main.aSQL.ExecQuery2("SELECT * FROM product WHERE ArtistID_fk = ?", Array As String(Main.globID)) 'i now have the following values id, name, price, image_blob in the cursor

'.. code for how to generate simple JSON Object like this {"id": id, "name": name} etc
 

RhodesB4A

Member
Licensed User
Longtime User
The server side already has SQL statements that fire off.. All i need to do is post that data+ServerURL.. so that would not work for me plus the image has to be encoded to base64 first (but I figured that out). I just need help generating the JSON object now
 
Upvote 0

Juan Pedro Arce

Member
Licensed User
Longtime User
Hello, this explains how to generate a JSON object with ExecuteJSON, but how would you pass or post the json object to a php script in a remote web server, like when you want to update a remote mysql database?
 
Upvote 0
Top