开发者

How to retrieve data using Web services in .NET

How to retrieve da开发者_C百科ta from database using Web services on VB?


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

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


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:

  • vbdotnetheaven
  • codeguru
  • techrepublic

As for the database, if you are talking about SQL Server, then see this page here and this page here


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.


  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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜