I need to connect to a database from my android app to my website mssql server. How to connect and retrive the values from my website database using c#.whether we need any webservice to connect.Any idea,pls help out.
And you have searched this forum first? Like http://forums.xamarin.com/search?Search=sql+server and read the answers you get there? And if you have done that why exact problem do you have? What error do you get in your code?
just tell me clearly how to perform database operation which is present in a database.
No, there is plenty of documentation on basic C# that relates to connecting to databases via MSDN and the internet (hint: use Google). In addition, there's docs.xamarin.com and the numerous posts in this forum (use the search feature) that explain this issue. You can look it up yourself as this topic has came up numerous times. God forbid you have to actually do some work rather than just copy/paste.
I honestly wouldn't bother trying to connect directly to the database, causes more trouble than it's worth and is very insecure.
Instead, if you have access to the website, create some web-services to provide the data/updates that you require.
The app I'm writing relies exclusively on the database of my company's main system, but I would never attempt to connect directly to it from an Android app - instead I have web-services set up to perform all the tasks I need.
As @StevenTheEven and @rmacias suggest, searching and/or Google is your friend here...
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies