you're going to want to start a new thread, for this question.
but best practice is to use a web service. you don't expose databases access directly to the internet.