Hi,
Do not try to connect to your SQL server directly from Anroid. Write
some script on your server (or webservice) then call those scripts (or
webservice methods) from your device using Http. Yes, this is an extra
layer between the mobile application and the database, but this is
very effective and proven.

If you have confusion how to do it, here is a hint:
Suppose your table INFO_TABLE is:
NAME   |   EMAIL
==============
Erfan | er...@somedomain.com
Sarwar | sar...@someotherdomain.com
~~~~~~~~~~~~~~~~~~~~~~~~~~

Now, you want to connect to DB and execute :  " select NAME, EMAIL
from INFO_TABLE where NAME='Erfan' "

Instead of trying to connect directly to the DB server, have a web
server on the DB server (or some server that has network access to DB
server). Put a script (say GetInfo.ashx)
In that file, connect to DB, execute the query. From the query result,
form XML or JSON and return it.

>From your android app, you can call the script like:
http://someserver.com/SuperService/GetInfo.ashx?NAME=Erfan

Or, you can use standard SOAP for calling and retrieving data.

=============

There are lots of code samples, tutorials available in the internet on
these topics. If you use Google, these are only few clicks away from
you.

Regards
Sarwar Erfan




On Aug 16, 4:23 pm, khalfaoui ameni <khalfaoui.am...@gmail.com> wrote:
> hello everyone,
> i want to connect to sql server from android but i can't find how...
>  I can't seem to find any information on connecting to a SQL Server DB
> to retrieve & add
> data. i find that i must use web service but i don't see how write it
> and how read my sql server database
>
> please help me.
>
> Ameni

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to