Android Question Illegal characters even though I urlencode the parameter

Dman

Active Member
Licensed User
Longtime User
I am passing parameters to mysql and have ran into an illegal character error. The dates in mysql db are stored in the format yyyy-MM-dd and when I try to pass them as that, it gives me an error and doesn't update the record.

I thought urlencoding that parameter would take care of the problem but it doesn't. Any suggestions?

B4X:
"&datepaid=" & su.EncodeUrl(dpaid, "UTF8")
 

warwound

Expert
Licensed User
Longtime User
Do you have access to the server?
Can you log the value that the server is trying to INSERT or UPDATE to a file and then examine the file to see exactly what value is being used in the query?

If you're using php then file_put_contents() is a quick and simple to use function that can write a string to a file.

Martin.
 
Upvote 0

Dman

Active Member
Licensed User
Longtime User
OK I got it working. I didn't change anything in my app but I switched the field in the db from date to varchar and it entered correctly. I then switched it back to date and it worked then too. I guess something was jiggy on it.

Thanks for the help guys.
 
Upvote 0
Top