Note: This question is not an Error in code question its a general question for information on Web-Service connecting to the database.
I am new to development and I need to know why should you use web service to talk to live database? I created a page and when I took it to my boss he said you are going to need to talk to the database through web service and I just want to know what is the difference between normal data access layer and going through web service?
why should you use web service to talk to live database?
Well, in short to provide abstraction. Without web service your client/consumer have to be smart enough to know how to deal with business model(s), interact with DB and convert the DB entities to your application model(s).
With service you are abstracting out this all stuff and thus your client has to only know how to call the service, pass the required parameters and what to get in return. That's it. It's kind a providing a simplified interface to your client (Facade Pattern)