Discussion:
Need Advice in Syncing Data From Android Device to SQL-Server Database
Aadi Rockzz
2012-11-14 07:40:02 UTC
Permalink
Hi,

I wrote an application in android which will sync with SQL-server database
that is sitting on my Local Server. while testing in real device using
emulator it's not syncing Giving me IOException.

I'm new to Android Technology. what my doubt is if i install this App in my
android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.

Please Help me to Solve this issue.

Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-14 10:52:22 UTC
Permalink
If i use Samsung Device i can see Kies Tray Agent Application Running in my
Task Manager.Can anyone tell me if is that the application helping samsung
android device to sync datas. I wanted to know this because in my computer
windows firewall i didnt configure this application. Please Anyone Help me
to Solve the Syncing Issue...
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server database
that is sitting on my Local Server. while testing in real device using
emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Mukesh Srivastav
2012-11-14 11:01:11 UTC
Permalink
Hi There,

Are you taking about the Sync with Between "Android Device to the Local DB
which sits on your computer" through the USB ?

if yes, did you write any windows Services which check that Android device
is connected and then read the applicaton localdb and upload the same in
the Local machine ?

Mukesh
Post by Anees Thyrantakath
If i use Samsung Device i can see Kies Tray Agent Application Running in
my Task Manager.Can anyone tell me if is that the application helping
samsung android device to sync datas. I wanted to know this because in my
computer windows firewall i didnt configure this application. Please Anyone
Help me to Solve the Syncing Issue...
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server
database that is sitting on my Local Server. while testing in real device
using emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-14 11:07:30 UTC
Permalink
No i didn't write anything like that in my app i used jtds.jdbc connection
to establish connection to database. My logic is after connecting device
through usb. I provide a button on my Android App if i press the button the
device should start syncing..Please let me know if the way i'm implementing
is wrong..
Post by Mukesh Srivastav
Hi There,
Are you taking about the Sync with Between "Android Device to the Local
DB which sits on your computer" through the USB ?
if yes, did you write any windows Services which check that Android device
is connected and then read the applicaton localdb and upload the same in
the Local machine ?
Mukesh
Post by Anees Thyrantakath
If i use Samsung Device i can see Kies Tray Agent Application Running in
my Task Manager.Can anyone tell me if is that the application helping
samsung android device to sync datas. I wanted to know this because in my
computer windows firewall i didnt configure this application. Please Anyone
Help me to Solve the Syncing Issue...
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server
database that is sitting on my Local Server. while testing in real device
using emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Andrew Mackenzie
2012-11-17 11:32:17 UTC
Permalink
Aadi, just to understand more what you want:

You're trying to have an Android app read/write to a SQLite database
running on your PC, using the USB connection?

That doesn't sound easy, and I'm not sure it's possible.

To get access over IP to the PC you will have to start by using the
loopback address of 10.0.2.2, not 127.0.0.1 which is the local address
INSIDE the android phone where the app is running.

I suggest start with a simple test to check you can reach your PC from
Android.
Try running a web server on your PC and loading a page from it from the
Android browser using the 10.0.2.2 address.

If you want to sync two SQLite databases (one on Android device and another
on the PC) over IP, then that's different - and I'm interested to know more
about your needs there....(changes on either side, synced, conflict
resolution, etc).
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-19 06:00:23 UTC
Permalink
Hi Andrew Mackenzie, I created an Andriod app that read/write to a *Microsoft
SQL-Server Database 2008 R2* database running on Server. Through using
Emulator(in my local PC) i'm able to sync data.

Problem comes while syncing the same app using USB Debugging in real
Device. While Trying to connect Using USB getting the following error
07-11 05:41:02.920: W/Error connection(2757): Network error IOException:
failed to connect to /194.178.100.1 (port 1433): connect failed:
ENETUNREACH (Network is unreachable)

I'm syncing data from SQLite (sits in Android App) to SQL-Server Database
Over IP.

As if now i didn't try the Option of Port Forwarding Let me try the way as
you mentioned.

Thanks alot for your reply.

Best Regards,
Aadi


On Sat, Nov 17, 2012 at 5:02 PM, Andrew Mackenzie <
Post by Andrew Mackenzie
You're trying to have an Android app read/write to a SQLite database
running on your PC, using the USB connection?
That doesn't sound easy, and I'm not sure it's possible.
To get access over IP to the PC you will have to start by using the
loopback address of 10.0.2.2, not 127.0.0.1 which is the local address
INSIDE the android phone where the app is running.
I suggest start with a simple test to check you can reach your PC from
Android.
Try running a web server on your PC and loading a page from it from the
Android browser using the 10.0.2.2 address.
If you want to sync two SQLite databases (one on Android device and
another on the PC) over IP, then that's different - and I'm interested to
know more about your needs there....(changes on either side, synced,
conflict resolution, etc).
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-19 08:20:05 UTC
Permalink
Hi, I tried *adb forward 194.178.100.1:1433 tcp:8080* which is a *private ip
*..got error *cannot bind socket *on cmd prompt.
Post by Anees Thyrantakath
Hi Andrew Mackenzie, I created an Andriod app that read/write to a *Microsoft
SQL-Server Database 2008 R2* database running on Server. Through using
Emulator(in my local PC) i'm able to sync data.
Problem comes while syncing the same app using USB Debugging in real
Device. While Trying to connect Using USB getting the following error
ENETUNREACH (Network is unreachable)
I'm syncing data from SQLite (sits in Android App) to SQL-Server Database
Over IP.
As if now i didn't try the Option of Port Forwarding Let me try the way as
you mentioned.
Thanks alot for your reply.
Best Regards,
Aadi
On Sat, Nov 17, 2012 at 5:02 PM, Andrew Mackenzie <
Post by Andrew Mackenzie
You're trying to have an Android app read/write to a SQLite database
running on your PC, using the USB connection?
That doesn't sound easy, and I'm not sure it's possible.
To get access over IP to the PC you will have to start by using the
loopback address of 10.0.2.2, not 127.0.0.1 which is the local address
INSIDE the android phone where the app is running.
I suggest start with a simple test to check you can reach your PC from
Android.
Try running a web server on your PC and loading a page from it from the
Android browser using the 10.0.2.2 address.
If you want to sync two SQLite databases (one on Android device and
another on the PC) over IP, then that's different - and I'm interested to
know more about your needs there....(changes on either side, synced,
conflict resolution, etc).
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-19 13:04:09 UTC
Permalink
Below is the settings what i got when i checked *adb shell netcfg*
System Directory: C:\Windows\system32# netcfg
netcfg
lo UP 127.0.0.1 255.0.0.0 0x00000049
eth0 UP 10.0.2.15 255.255.255.0 0x00001043
tunl0 DOWN 0.0.0.0 0.0.0.0 0x00000080
gre0 DOWN 0.0.0.0 0.0.0.0 0x00000080

Is that possible to define same network configuration on my Android Device?
I think if i can set-up same configuration i'll be able to sync.
Post by Anees Thyrantakath
Hi, I tried *adb forward 194.178.100.1:1433 tcp:8080* which is a *private
ip*..got error *cannot bind socket *on cmd prompt.
Post by Anees Thyrantakath
Hi Andrew Mackenzie, I created an Andriod app that read/write to a *Microsoft
SQL-Server Database 2008 R2* database running on Server. Through using
Emulator(in my local PC) i'm able to sync data.
Problem comes while syncing the same app using USB Debugging in real
Device. While Trying to connect Using USB getting the following error
ENETUNREACH (Network is unreachable)
I'm syncing data from SQLite (sits in Android App) to SQL-Server Database
Over IP.
As if now i didn't try the Option of Port Forwarding Let me try the way
as you mentioned.
Thanks alot for your reply.
Best Regards,
Aadi
On Sat, Nov 17, 2012 at 5:02 PM, Andrew Mackenzie <
Post by Andrew Mackenzie
You're trying to have an Android app read/write to a SQLite database
running on your PC, using the USB connection?
That doesn't sound easy, and I'm not sure it's possible.
To get access over IP to the PC you will have to start by using the
loopback address of 10.0.2.2, not 127.0.0.1 which is the local address
INSIDE the android phone where the app is running.
I suggest start with a simple test to check you can reach your PC from
Android.
Try running a web server on your PC and loading a page from it from the
Android browser using the 10.0.2.2 address.
If you want to sync two SQLite databases (one on Android device and
another on the PC) over IP, then that's different - and I'm interested to
know more about your needs there....(changes on either side, synced,
conflict resolution, etc).
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Durgesh Kumar
2012-11-18 03:29:19 UTC
Permalink
Sir I am also working with a same project and I am beginner for this. Can I
get a sample code for the same. This will help many users like me.
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server database
that is sitting on my Local Server. while testing in real device using
emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-20 05:22:57 UTC
Permalink
Refer this link
http://amitku.wordpress.com/2011/08/03/how-to-connect-and-access-sql-database-server-from-android-app/
Post by Durgesh Kumar
Sir I am also working with a same project and I am beginner for this. Can
I get a sample code for the same. This will help many users like me.
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server
database that is sitting on my Local Server. while testing in real device
using emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Anees Thyrantakath
2012-11-23 11:51:21 UTC
Permalink
TCP List Available In Emulator

System Directory: C:\Windows\system32# netstat -an
netstat -an
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:5037 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN
tcp 97 0 10.0.2.15:5555 10.0.2.2:52557
ESTABLISHED
#
---------------------------------------------------------------------------------
TCP List Available in Android Device while Connecting Through USB

System Directory: C:\Windows\system32$ netstat -an
netstat -an
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:7777 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7777 127.0.0.1:59142
ESTABLISHED
tcp 0 0 127.0.0.1:59141 127.0.0.1:7777
ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:59141
ESTABLISHED
tcp 0 0 127.0.0.1:59142 127.0.0.1:7777
ESTABLISHED
tcp6 0 1 ::ffff:223.178.145.5:59916 ::ffff:74.125.236.41:443CLOSE_WA
IT
tcp6 0 1 ::ffff:223.178.145.5:54502 ::ffff:202.86.6.175:80CLOSE_WAIT

tcp6 0 1 ::ffff:223.178.145.5:55982 ::ffff:106.10.137.175:80CLOSE_WA
IT
tcp6 0 1 ::ffff:223.178.145.5:50863 ::ffff:74.125.235.56:80CLOSE_WAI
T
tcp6 0 0 ::ffff:223.178.145.5:43622 ::ffff:67.195.186.237:80ESTABLIS
HED
tcp6 0 1 ::ffff:223.178.145.5:45061 ::ffff:203.84.220.39:80CLOSE_WAI
T
tcp6 0 1 ::ffff:223.178.145.5:38525 ::ffff:74.125.236.41:443CLOSE_WA
IT
tcp6 48 0 ::ffff:223.178.145.5:55454 ::ffff:173.194.72.188:5228ESTABL
ISHED
tcp6 0 1 ::ffff:223.178.145.5:40214 ::ffff:74.125.236.46:443CLOSE_WA
IT
tcp6 0 1 ::ffff:223.178.145.5:58103 ::ffff:74.125.236.32:443CLOSE_WA
IT
tcp6 0 1 ::ffff:223.178.145.5:34903 ::ffff:74.125.236.39:443CLOSE_WA
IT
$

Above Are TCP List in Android phone and Device
I tried port forward also below are the code of that but it's also giving
error please give me any idea To Solve this syncing issue.
Port Forward

C:\Android\android-sdk\platform-tools>adb forward tcp:5555
194.178.100.1:1433

Computer name: PC23-PC
User name: User-PC
System Directory: C:\Windows\system32error: cannot bind socket
Post by Anees Thyrantakath
Refer this link
http://amitku.wordpress.com/2011/08/03/how-to-connect-and-access-sql-database-server-from-android-app/
Post by Durgesh Kumar
Sir I am also working with a same project and I am beginner for this. Can
I get a sample code for the same. This will help many users like me.
Post by Aadi Rockzz
Hi,
I wrote an application in android which will sync with SQL-server
database that is sitting on my Local Server. while testing in real device
using emulator it's not syncing Giving me IOException.
I'm new to Android Technology. what my doubt is if i install this App in
my android device when i have to perform sync operation by connecting the
device through USB. Is there any need of Application to be installed that
will help the device to sync data to Database.
Please Help me to Solve this issue.
Best Regards,
Aadi
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers+***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Continue reading on narkive:
Search results for 'Need Advice in Syncing Data From Android Device to SQL-Server Database' (Questions and Answers)
10
replies
What database works best for a mobile app.?
started 2018-06-17 15:41:13 UTC
programming & design
Loading...