How to retrieve data from database using Web services on VB?
If I understand you correctly, you are asking how to setup a web service using vb.net to communicate with the database and return the results.
If that is correct, then there are 2 parts:
- How to write a web service
- How to communicate with a database
Here are three pages that will help you create a web service:
As for the database, if you are talking about SQL Server, then see this page here and this page here
Hi,
Your question isn't clear enough. Are you trying to access a web service run by ASP.NET using VB? If yes, you can make SOAP request to your web service easily using VB, your web service will then fetch the data from database and return to you. You can have a look at this tutorial on how to make a SOAP request using VB -
http://www.aspfree.com/c/a/VB.NET/Calling-a-Web-Service-using-VB6-with-SOAP-30/1/
Hope that helps.
Does it have to be a web service? Have you considered WCF? (Windows Communication Foundation)
- Create a proxy class from the web service's WSDL, using Visual Studio's "Add Web Reference" feature
- Configure the proxy, such as for security, if needed (the details depend on the API)
- Call the proxy from your code