Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dragging and dropping a stored procedure in the VS.net designer

Status
Not open for further replies.

RebLazer

Programmer
Jun 7, 2002
438
US
I have successfully dragged and dropped tables onto the VS.net designer to subsequently populate controls with their data. When I drag the table onto the designer, VS.net creates a connection and data adapter and shows them both on the designer. I then generate a dataset (also using the designer) from the data adapter. The only thing that I write in my code is a line like [tt]SqlDataAdapter1.Fill(Dataset1)[/tt]

I now want to drag and drop a stored procedure onto the designer. When I do that, it creates a connection and a command, and displays those two objects in the designer. How do I then fill a control from there? Must I create a dataset - or is there some way to do it automagically - just like there is when using a table directly?


Thanks!
Lazer [rainbow]
 
Lazer,

You still have to fill a dataset since a stored proc returns data dynamically, whereas when binding to a table the data structure and data is static. You could build a view of the stored proc then bind it directly to the view.
Hope This Helps,
Bueller
 
Thanks, Bueller.

Is there an automagical way to just drag and drop a stored procedure to get it to populate a control - similar to my experience (above) with dragging and dropping tables onto the designer?

Thanks,
Lazer
 
Lazer,

Unforunately there is no way to do it automagically.
-Bueller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top