Hi, I have a question about the connection to remote DB mySQL: I realized a App able to read and write a table on remote mySQL DB located on my server.
In the table there is also a BLOB field for the image. I can send the Data fields completed of blob field to DB on the server converting the field to string data
The problem is when I try to request the data from the server, only when the BLOB field in not empty.
In the JobDone sub I have the error in the follow instruction (parser.NextArray)
I think I'm not correct conversion of the BLOB field in the string in the php files on the server.
What do you think? Where can be the problem?
Thanks.
In the table there is also a BLOB field for the image. I can send the Data fields completed of blob field to DB on the server converting the field to string data
B4X:
Buffer2 = cursoreTmp.GetBlob("image")
If Buffer2 <> Null Then encoded = su.EncodeBase64(Buffer2) 'data is a bytes array
ExecuteRemoteQuery2(ADati, encoded)
B4X:
Sub ExecuteRemoteQuery2(par() As String, Buffer2 As String)
Dim job As HttpJob
Dim myInd As Int
job.Initialize("q000", Me)
job.PostString("http://" & ip & "/" & page & ".php?par1=" & par(1) & "&par2=4&par3=" & par(2) & "&par4=" & par(2).length, Buffer2)
End Sub
The problem is when I try to request the data from the server, only when the BLOB field in not empty.
In the JobDone sub I have the error in the follow instruction (parser.NextArray)
B4X:
Dim MYDATA As List
MYDATA = parser.NextArray 'returns a list with maps
I think I'm not correct conversion of the BLOB field in the string in the php files on the server.
What do you think? Where can be the problem?
Thanks.