Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.

Log in or register to post/reply in the forum.

using HTTPPost to send out data from a datatable

JPRodrigues Feb 14, 2018 06:08 AM


I have need to send data from some dataloggers to a server through HTTP and im using HTTPPost to do it

at this moment im reading the datatable, field by field and mounting the message i want.

But i was reading the help from the function and it says that i can use data directly from a data table.

My problem is that i cant find a way to read the datatable directly (i was trying to avoid creating a new file in memory!!!)

Can anyone help me with this?

Best regards

aps Feb 14, 2018 07:55 AM

Please have a look at this document which discusses ftp streaming:


The same principles apply to httpost, using similar optional parameters at the end of the instruction.

Make sure that you have the latest operating systems and help system in the CRBasic editor so you have full details of the extended parameters.

Evaldebenito Jul 18, 2018 03:08 PM

Hi, how are you doing?

JPRodrigues, do you have any examples using HTTPPost?
It would be a great help to us.
thank you very much from now on to anyone who can help us


JPRodrigues Jul 19, 2018 03:45 AM

Hi Evaldebenito

In my case, as i didnt get what i was expecting, i twisteted the question a little and to my URL I added the tokken with the identification of the station and the collected data:

token_ini= "?token=lpEFICUcXZbYlDW18H6Kd9tYPP8DCycW&timestamp="+tabletime+"&record="+Dados10m.record(1,1)
token_temp= "&temp="+Temp+"&temp_avg="+Dados10m.temp_avg(1,1)+"&temp_max="+Dados10m.temp_max(1,1)+"&temp_min="+Dados10m.temp_min(1,1)+"&temp_std="+Dados10m.temp_std(1,1)
token_hrel= "&hrel="+HRel+"&hrel_avg="+Dados10m.hrel_avg(1,1)+"&hrel_max="+Dados10m.hrel_max(1,1)+"&hrel_min="+Dados10m.hrel_min(1,1)+"&hrel_std="+Dados10m.hrel_std(1,1)
token_vento= "&vvento_wvc1="+Dados10m.vvento_wvc(1,1)+"&vvento_wvc2="+Dados10m.vvento_wvc(1,2)+"&vvento_avg="+Dados10m.vvento_avg(1,1)+"&vvento_std="+Dados10m.vvento_std(1,1)+"&vvento_max="+Dados10m.vvento_max(1,1)+"&dvento_smm="+Dados10m.dvento_smm(1,1)
token_prec= "&precip_tot="+Dados10m.precip_tot(1,1)+"&intprec_max="+Dados10m.intprec_max(1,1)
token_porv= "&porv="+POrv+"&porv_avg="+Dados10m.porv_avg(1,1)+"&porv_max="+Dados10m.porv_max(1,1)+"&porv_min="+Dados10m.porv_min(1,1)
token_batt= "&batt_min="+Dados10m.batt_min(1,1)


HTTPPost ("http://api.sug.prilaier.org/probes/meteorologicas_teste.php"&token,"",HTTPResponse,"")

In my case this does the trick. Hope it helps you.

Any question you have that i can help please ask.

Best regards


mortenx Jul 28, 2018 04:15 AM

how can i make "if" statement so that httpost done so many times when its ok ?
sometimes it is getting error "Http comms Error"

Nicolas Jul 2, 2021 08:40 AM

Have you found a solution to directly read the content of a table?

Thank you

Log in or register to post/reply in the forum.