Databind DataReader directly to ServerControls?

Posts   
 
    
gfunny
User
Posts: 20
Joined: 21-Apr-2005
# Posted on: 02-Jul-2007 21:37:08   

I'm looking for something similar to SqlDataReader to bind directly to Gridview, dropdownlists, etc. Your data read just allows to fill custom classes, datatables etc. Do you have anything similiar to SqlDataReader?....ust a fast firehose databind. I don't see anything.

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 02-Jul-2007 22:55:16   

LLBLGenProDataSource for Self Service and LLBLGenProDataSource2 for Adapter.

gfunny
User
Posts: 20
Joined: 21-Apr-2005
# Posted on: 03-Jul-2007 04:04:36   

Yes but it appears you still have to put the results into a structure and then the structure is bound. ie- datatable, custom classes, collections. I'm looking for how you can bind a sqldatareader right to the the control, without having to fill an intermediary structure between the databind.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Jul-2007 07:22:08   

What is exactly your need? LLBLGenPro is an efficient and powerful OR-Mapper tool. Are you concern for the efficient or there is something else?

David Elizondo | LLBLGen Support Team
gfunny
User
Posts: 20
Joined: 21-Apr-2005
# Posted on: 03-Jul-2007 15:18:59   

yeah I was just looking at fastest performance, I may be splitting hairs here- normally you can databind a SQLDataReader directly to say a dropdownlist which is fastest, forward, readonly datasource. In that case I'm not filling a structure first and then binding the structure to the DropDownlist. I'm binding the datasource directly to the server control.
LLBLGEN does have their datasource control true, but it appears you have to first fill some strutcure- ie. collections, then bind that to the datasource.

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 03-Jul-2007 15:23:25   

the most resource intensive operation is the database connection. Usually you want to keep this connection open a little as possible. So it's actually better to open the connection, fill an in memory object and close the connection. Then you are free to utilize the in-memory object without effecting the db.

You now have the option to modify the in memory object if necessary without an open db connection.

gfunny
User
Posts: 20
Joined: 21-Apr-2005
# Posted on: 03-Jul-2007 15:29:00   

Thank you, thaaaats what I was thinking why I didn't see anything like what I describing. Thanks!

Aurelien avatar
Aurelien
Support Team
Posts: 162
Joined: 28-Jun-2006
# Posted on: 03-Jul-2007 15:36:54   

Hi,

btw llblgenprodatasource store db data in session or viewstate, so there is no db connection at each postback.