Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ASP .Net Web Services
Retreive Data from WS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Morx, post: 4314319"] My web service retreives data from a NorthWind database. THIS works with Windows form but the same code wont work in ASP.NET project. WHY? My web service ---------------- <WebMethod()> Public Function GetCustOrders(ByVal IDMask As String) As DataSet IDMask = IDMask.Replace("'", "''") Dim con As New SqlConnection("server=MARKUS;database=Northwind;trusted_connection=true") Dim daCust As New SqlDataAdapter("Select * From Customers Where CustomerID Like '%" & IDMask & "%'", con) Dim ds As New DataSet con.Open() daCust.Fill(ds, "Cust") con.Close() Return ds End Function Consume code for my application -!!! Why this works for Windows forms but not for ASP.NET !!! ---------------------------------------------------------------------------- ----------------------------------------------- Dim MyService As New localhost.Service1 MyService.Credentials = System.Net.CredentialCache.DefaultCredentials DataGrid1.DataSource = MyService.GetCustOrders(TextBox1.Text) DataGrid1.DataMember = "Cust" End Sub Controls on ASP.NET form are textbox, button and datagrid. Thank you all [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ASP .Net Web Services
Retreive Data from WS
Top