This example illustrated how to create a Webservice and how to consume it.
Hello friends in this example I have illustrated how to create a Webservice and how to consume it. I have included the readme.txt file which explains the purpose of the Webservice and its usage. Also in the ZIP file i have include the solution files for the Webservice and the Application. The attached project zip file has two files. Readme.txt and WebService.zip. Readme explains how to use the code. Sample code for the Webservice CSC:
Hello friends in this example I have illustrated how to create a Webservice and how to consume it. I have included the readme.txt file which explains the purpose of the Webservice and its usage. Also in the ZIP file i have include the solution files for the Webservice and the Application.
The attached project zip file has two files. Readme.txt and WebService.zip. Readme explains how to use the code.
Sample code for the Webservice CSC:
Public Function GetCSC(Optional ByVal Countryname As String = "", Optional ByVal Statename As String = "") As
DataSet
Dim ds As New DataSet()
conStr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=WorldCSC;Data
Source=WEBMASTER;"
adconn = New ADO.ADOConnection(constr)
adconn.Open()
If countryname = "" Then
sqlStr = "Select * from Countrymaster"
Else
If statename = "" Then
sqlStr = "select * from Statemaster where countryId = (select countryID from countrymaster where
countryname = '" & Trim(countryname) & "')"
sqlStr = "select * from citymaster where stateId = (select stateid from statemaster where statename
= '" & Trim(statename) & "')"
End If
addataset = New ADO.ADODataSetCommand(sqlstr, adconn)
If Countryname = "" Then
addataset.FillDataSet(ds, "Countrymaster")
addataset.FillDataSet(ds, "StateMaster")
addataset.FillDataSet(ds, "CityMaster")
GetCSC = ds
End Function
Pro WPF: Windows Presentation Foundation in .NET 3.0