I Am relatively new to java database accessing..
I need to access an SQL Server database..basically i need to use it in Android but I am trying to create web service in java.
can i have a sample code for it??
Please Help

this is not a "gimme codezzzz" forum. you start writing your code, we 'll help you tackle any difficulties you meet along the way.

That's nowhere near enough info. But in any case there's loads of tutorial and sample code on the web, just Google it! Come back here when you have any specific questions, and remember the DaniWeb rules you agreed to when you joined, in particular "Do provide evidence of having done some work yourself if posting questions from school or work assignments"