I need to develop an application which can access an SQL Server database stored on a server in an office. On call staff remote desktop into a terminal server, and access the database using the desktop application for which the Database was made. The desktop application accesses the database with an ODBC connection.
I am writing an android application which will allow a small part of the access to this database that is available in the desktop application, and I am looking for ways to connect my application to this database, whether it is using the ODBC connection (Potentially using .Net), or in some other way.
Edit: Sorry for those who replied before I finished explaining my question, it posted by accident and some of you answered before I finished editing.
you have to write a webservice on the server side. can send the data as Json packets to the device and in device parse the json packets and access the data. your calls to webservice should be a http call eg
http:\server\metnod\get_somedata?name=something
and the server should query the database for this parameter and send you the reponse as Json.
parse json and get your details.
Edit:
set the content-type as “application/json” in the server response header. This is a example for client to send a http post request to the server. here jsonobjSend is the json i have contructed to send to the server with some details. ex {table:”sometable”, id:90 }. jsonobjRecv is the json which will be sent by the server
}
to create/parse a json check json.org