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

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
snop21
Posts: 90
Joined: Mon Jan 20, 2014 2:54 pm

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

Post by snop21 » Mon Jan 20, 2014 5:36 pm

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..! :))

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

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

Post by Mark » Mon Jan 20, 2014 6:20 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

snop21
Posts: 90
Joined: Mon Jan 20, 2014 2:54 pm

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

Post by snop21 » Wed Jan 22, 2014 1:33 pm

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.. :))

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

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

Post by jacque » Wed Jan 22, 2014 7:48 pm

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?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

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

Post by Mark » Sun Jan 26, 2014 2:44 am

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply