conect to microsoft 2003 database from android - java

i know there are millions of topics on the net about connecting to a external database, but i don't get the clue which ones i have to follow. probably this is because i am an beginner for java and android programming.
my setup:
-microsoft sql server 2005 on a server connected to the internet
-android app i am working on in java (eclipse)
what i want to try first:
-user gives an input number
-i go search this number and return the data from the database do put in on the screen of my android.
i've been reading alot about json and php scripts but i don't know where to start. this database is also used for other windows aplications, there the database is entered by the windows authentication i was told.
is it possible to also use this windows authentication?
anyway, what to do first for me?
thanks in advance

See answers here: Connecting android with MS SQL SERVER 2008
You should really use a webservice, connecting to the database is not the best practice.

Related

How would I go about creating an android app that displays tables of data from an SQL Server?

I'm trying to make an android application that displays tables of sorted data which is stored on a 2008 MS SQL Server. I already thoroughly googled this issue and essentially every person who wanted to connect to a server directly through Android was told they should make a web service which bridges the app with the database server. Problem is, I have no clue how to do that. I only have (v. limited) java/android knowledge.
Instead, I was hoping that the data on the server could somehow be stored locally on the phone and used by the app, instead of connecting to the server directly, which is slow and insecure. (This is a HUGE database we're talking about - 100,000s of entries) Would that be feasible at all?

How to connect to internet via pppoe by java in Ubuntu

*Hi all
I am a new guy in java and ubuntu.I knew that in windows,i can use rasdial or rasphone to connect to the internet via pppoe .However,what i face now is ubuntu.so ,my question is that how to use java to connect the internet via pppoe in ubuntu(not windows,i mean,ubuntu or debian,anyways,linux)
i have found a solution here:
http://code.google.com/p/news-recommender/source/browse/trunk/WeiboCrawler/src/crawler/sina/exe/PPPOE.java?r=706
but it is not what i want as in my computer there are many networkcards(eth0-eth8),and i want to build different pppoe connections in different networkcards(eth0-eth8)......so, how to implement it by java in ubuntu or debian automatically(You know,i mean,without any dial boxes without any manual participations)?
thanks in advance

Android connectivity with sql database

I'm new to android technology. Can anyone, please, suggest me some proven idea to connect an android application from my laptop to a remote sql database server (without using php). I got connected from my java file to the database. But the output is displayed in the console part. How to get it displayed on the android screen?
For using webservies in Android you will require Ksoap Library.

Questions about servers, databases, and android

Ok so I'm trying to develop a server for an android app that I'm developing.
Basically it's an application that needs to connect with other phones through a database system.
I was thinking of using an sql database to store the simple data I need to exchange.
What type of server should I be using?
What language should I be writing the database code in (if besides SQL)?
How do I get the android application to communicate and exchange information with the database?
Is there a type of virtual server I can use to test my app?
The server type and language choices very much depend on your skillset and environment. However, I'd suggest exposing queries to your database either through JSON or XML, and presenting through a web server.
PHP & MySQL are as good a choice as any, as you can run the same code on UNIX, Linux, Solaris, or MacOS servers. Of course, using a J2EE environment with JDBC drivers to a generic server is also a good choice, especially if you need to share any classes between Android and your server.
By 'virtual server' I assume you mean 'virtual handset', in which case the Android emulator in the SDK might be good enough (although it is painfully slow), or just use a real Android device plugged in to your development machine.
Hope this helps,
Phil Lello

Best way to implement Client <-> Server <-> Database architecture in an Android application?

I am making an Android application. Since it is so simple, I first thought I could simply eliminate the need for Java application on the server which acts as a middleware. I tried directly connecting to the database using the JDBC driver for MySQL but my program is crashing so I'm not sure if Android "supports" the JDBC driver for MySQL.
So I am thinking of how to implement the application. Basically the application writes some data from a remote MySQL database and retrieves some data from a remote MySQL database.
Do I connect to a Java server program using sockets (or some other method of communication)? Or could I implement a direct connection to the MySQL database from the client application?
I tried directly connecting to the
database using the JDBC driver for
MySQL but my program is crashing so
I'm not sure if Android "supports" the
JDBC driver for MySQL.
Never never never use a database driver across an Internet connection, for any database, for any platform, for any client, anywhere. That goes double for mobile. Database drivers are designed for LAN operations and are not designed for flaky/intermittent connections or high latency.
Do I connect to a Java server program
using sockets (or some other method of
communication)?
It doesn't have to be Java. It just has to be something designed for use over the Internet. As Mr. King's comment suggests, Web services have been used for this for much of the past decade. For Android, REST Web services are probably the easiest to consume, since there is no built-in support for SOAP or XML-RPC. But whether the Web service is implemented in Java, or PHP, or Perl, or SNOBOL, is up to you.
Well, OK, perhaps SNOBOL won't be a viable option. :-)
I know this might be a little late but as I ran into the same problem with a project at school I wanted to share my solution with you as you might profit out of my experiences.
Android is bad for Database-Operations so creating a normal Database-Controller wasn't a thing. Instead I created a Server in Java which handles all Database-related stuff and can also be extended (in my case I used a Feedback-function, too).
The Github-REPO is: https://github.com/Cedced-Bro/Public-Server You can check it out and this is open-source so you can use and contribute to it if you have more ideas to it.
To answer your question more properly: I would strongly suggest to NOT grant all users direct access to your DB as you can run into security issues with malicious users. This was the reason why I created this controller in the first place instead of just a PHP "forwarding"-server.

Categories