views:

109

answers:

5

How to retrieve data from database using Web services on VB?

A: 

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:

  1. How to write a web service
  2. 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

Gabriel McAdams
A: 

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.

Silent Walker
oh, I have created the webservice, just want to know how to retrieve database data from web service. Thanks anyway=)
tohru
A: 

google astoria ado.net data services

Alexander Taran
+1  A: 

Does it have to be a web service? Have you considered WCF? (Windows Communication Foundation)

http://msdn.microsoft.com/en-us/netframework/aa663324.aspx

Larry Watanabe
A: 
  1. Create a proxy class from the web service's WSDL, using Visual Studio's "Add Web Reference" feature
  2. Configure the proxy, such as for security, if needed (the details depend on the API)
  3. Call the proxy from your code
RickNZ