D Dman Active Member Licensed User Longtime User Feb 3, 2014 #1 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? Code: Copy "&datepaid=" & su.EncodeUrl(dpaid, "UTF8")
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? Code: Copy "&datepaid=" & su.EncodeUrl(dpaid, "UTF8")
Erel B4X founder Staff member Licensed User Longtime User Feb 3, 2014 #2 Are you sure that this is the problematic parameter? Are you sure that your server uses UTF8 encoding? The url will be encoded correctly. You can check the output of su.EncodeUrl. Upvote 0
Are you sure that this is the problematic parameter? Are you sure that your server uses UTF8 encoding? The url will be encoded correctly. You can check the output of su.EncodeUrl.
warwound Expert Licensed User Longtime User Feb 3, 2014 #3 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
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.
D Dman Active Member Licensed User Longtime User Feb 4, 2014 #4 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
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.