| |

VerySource

 Forgot password?
 Register
Search
View: 726|Reply: 3

How to get the data set returned during the stored procedure !!!

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-7 06:30:02
| Show all posts |Read mode
How to get the data set returned by the stored procedure?
E.g:
In stored procedure, there is select @aa as a
Ha ha put the returned value into the dataset?
Please master teaching
Thank you!
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-1-7 10:48:01
| Show all posts
1. Return DataReader directly;
   
2. Return DATATABLE in a DATASET

The same usage as using SQL statements
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-11 18:54:01
| Show all posts
When reading a class of information unconditionally and simply, the stored procedure without parameters can be satisfied. In the application, SqlDataReader can be used in conjunction with it. SqlDataReader can quickly obtain the results of the query and provide a read-only row stream from the database A way. Can also be used with SqlDataAdapter and DataSet.
SqlDataReader dr = myCommand.ExcuteReader (CommandBehavior.CloseConnection);
// Execute the database access command. When the command is executed, if the associated DataReader object is closed, the associated Connection object will also be closed.
Reply

Use magic Report

0

Threads

10

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-19 22:45:01
| Show all posts
Can refer here,
Analysis of multi-table operation in ADO.NET
http://blog.csdn.net/Leng Yuxue / archive / 2004/08/06 / 67016.aspx
http://blog.csdn.net/Leng Yuxue / archive / 2004/08/06 / 67037.aspx
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list