Wrox Programmer Forums
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2003, 07:05 AM
Authorized User
 
Join Date: Sep 2003
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default Datagrid Population

hi,

I have a datagrid, the columns of which i have to populate from values returning from a stored procedure.
Say there are 10 columns in the datagrid.
My 9 columns have to be populated from the output of a stored Procedure. The input of the stored proc is going to be the value of column 1.

My doubt is how will i bind the data returned by the stored proc to the datagrid??

Thanks in advance,

Jaya


 
Old November 5th, 2003, 10:09 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

So you aren't really populating a datagrid from a stored procedure. You are using the sproc to retrieve a single row dataset for a given value. It sounds like you are calling this sproc once for every row in the datagrid.

Where are the initial values coming from for that first column?

Peter
----------------------------------------
Work smarter, not harder.
 
Old November 5th, 2003, 11:52 PM
Authorized User
 
Join Date: Sep 2003
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi Peter,

Yes u r right. I m using the sproc to populate every row.

The values for the first column are populated by firing a query.
So using a loop.
That is the main query which returns the first column and for every value returned by tht query, I m calling the sproc.

Thanks
Jaya

 
Old November 6th, 2003, 11:10 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Is there is a reason that you can't get all your data with a single query? This would be much more efficient if you have the database do all the work to assemble the data, then you can just bind the grid to a single result.

If there isn't a way do optimize it at the database, then I'll see if I can suggest something you can do at the datagrid.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Generic collection population from database micmit C# 2005 7 September 19th, 2006 05:53 AM
Runtime Population of a JTable Sandz Java GUI 1 February 28th, 2005 10:10 AM
Re-population of text boxes Louisa VB.NET 2002/2003 Basics 3 March 16th, 2004 05:59 AM
Datagrid population KennethMungwira ADO.NET 1 November 6th, 2003 11:06 AM
Datagrid Population jayabhatia .NET Web Services 1 October 31st, 2003 11:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.