A stored procedure, several results, how to display, stored procedure, and display
Some netizens on the Forum asked:
"
The stored procedure of the Three-table join query has three tables. How can I use the GridView to display the results?
"
No detailed Problem description was provided. Understand Insus. NET and solve the following problem: in the database, create a stored procedure, slightly over three table associations, so that it can only have three results
Go to the asp.net site, we use the following logic to process class library http://www.cnblogs.com/insus/p/3826706.html under the App_Code directory, create an Info class:
Create a webpage, such as Default. aspx, and pull three GridView controls:
In Default. aspx. cs:
The following figure shows the effect of running a webpage:
How can I display the query results in the stored procedure?
It may be that the database you created is not in the database you modified ..
Let's take a look at how to write SQL statements or stored procedures. I want to add a piece of data to the results shown in the figure.
Write a temporary table variable and save your result set as @ tempTable
Insert
Insert @ tempTable (Field 1, Field 2...) values (value 1, value 2 ...)
Select * from @ tempTable