jjc9809
asked on
Loading a Grid View with Temporary Table using web services
Hi Everybody,
I am new to the web and web services. I need to load a gridview from a temporary table which is determined bya Stored Procedure. How do you pull data from the temporary table and fill a gridview when the application is being used by web services?
I have attached a copy of the web configuration file and the Stored Procedure. I have a new web page I have created called Movement.aspx. Do I do the HTML coding for the gridview in the design view of the Movement.aspx page or does it need to be done in an asmx page?
Also, where does the VB Coding go? Do I place this coding in the Movement.aspx.vb?
Do I connect the gridview to the IMAS Connection String in the web config file?
Any help is appreciated.
SP.Doc
webConfig.doc
I am new to the web and web services. I need to load a gridview from a temporary table which is determined bya Stored Procedure. How do you pull data from the temporary table and fill a gridview when the application is being used by web services?
I have attached a copy of the web configuration file and the Stored Procedure. I have a new web page I have created called Movement.aspx. Do I do the HTML coding for the gridview in the design view of the Movement.aspx page or does it need to be done in an asmx page?
Also, where does the VB Coding go? Do I place this coding in the Movement.aspx.vb?
Do I connect the gridview to the IMAS Connection String in the web config file?
Any help is appreciated.
SP.Doc
webConfig.doc
ASKER
GED325,
Thanks for the information. This information will be very helpful to me.
Please find my attached VB coding for the gridview.
Does this coding look like it might work. The STored Procedure call, what do I place in the vb coding to call this stored procedure to load the gridview?
My Coding:
Imports System.Web
Imports System.Collections
Imports System.Web.Services
Imports System.Web.Services.Protoc ols
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Public Class Movement1
Inherits System.Web.Services.WebSer vice
Dim con As New SqlConnection(Configuratio nManager.C onnectionS trings("Co nnectionSt ring").Con nectionStr ing)
Dim da As SqlDataAdapter
Public WebService()
[Web Method]
Public DataSet GetMovementA()
String Query = String.Empty
Query = ‘Select * From tblMovement
Con.Open()
da = New SqlDataAdapter(Query, Con)
DataSet gvMovement = NewDataset()
Da.Fill(gvMovement)
Con.Close()
Return gvMovement
Thanks for the information. This information will be very helpful to me.
Please find my attached VB coding for the gridview.
Does this coding look like it might work. The STored Procedure call, what do I place in the vb coding to call this stored procedure to load the gridview?
My Coding:
Imports System.Web
Imports System.Collections
Imports System.Web.Services
Imports System.Web.Services.Protoc
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Public Class Movement1
Inherits System.Web.Services.WebSer
Dim con As New SqlConnection(Configuratio
Dim da As SqlDataAdapter
Public WebService()
[Web Method]
Public DataSet GetMovementA()
String Query = String.Empty
Query = ‘Select * From tblMovement
Con.Open()
da = New SqlDataAdapter(Query, Con)
DataSet gvMovement = NewDataset()
Da.Fill(gvMovement)
Con.Close()
Return gvMovement
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The Web service is responsible for providing the data. That's it.
So your web service would have code that allows any progam to call it's function. from there the function would execute the stored proc with any parameters and return a datatable or something.
Your web PAge (ASPX + VB) is responsible for retreiving data from a source, and displaying that in a grid view.
So your ASPX would have the HTML markup.
The ASPX.VB would have the funtionality of calling the web service, getting the data, and binding it to the grid view.
Hope that helps.