Page 1 of 1

Unable to connect to the database:can't create TCP/IP socket

Posted: Mon Jan 20, 2014 5:36 pm
by snop21
Hello livecoders,

Need your help. I can't access my MySql database using my andriod app in local network.

I have MySql Database running on my server PC, I am trying to connect to it from my android app which is connected also to the network.

but i got an error "Unable to connect to the database:can't create TCP/IP socket"

Thank you LiveCoders.

Kudos..! :))

Re: Unable to connect to the database:can't create TCP/IP so

Posted: Mon Jan 20, 2014 6:20 pm
by Mark
Hi,

Sockets aren't officially supported yet.

To connect to a database on a server, write some PHP scripts and use get URL to upload and download the data.

Kind regards,

Mark

Re: Unable to connect to the database:can't create TCP/IP so

Posted: Wed Jan 22, 2014 1:33 pm
by snop21
Thanks Mark.. :))

I spent almost a day trying to connect it with my Andriod App.. I am a newbie in Livecode that why I find it hard so far. Hope with help you guyz here in forum I can
learn and get better to this Programming Language.

Can I ask mark if it is okay with you just a hint how to do it with php script.

Thank you very much.. :))

Re: Unable to connect to the database:can't create TCP/IP so

Posted: Wed Jan 22, 2014 7:48 pm
by jacque
I'm no database expert, but the dictionary says it should work on Android. Can you post your script here? Are you using revOpenDatabase?

Also, did you include the database libary in the General pane of the standalone settings, and also include Internet perimissions in the Android pane?

Re: Unable to connect to the database:can't create TCP/IP so

Posted: Sun Jan 26, 2014 2:44 am
by Mark
Hi,

Actually, Jacque is right that revExecuteSQL, revDataFromQuery and the revQuery* commands and functions should work on Android. If you get a socket error, perhaps you didn't select the correct permission in the standalone application settings. Also you might want to test if you can access your server with the internet browser of your Android device, if you have a web server running in your local network.

Kind regards,

Mark