TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
brunk.ac
NA
1
0
SqlDataReader Called From a Component Leave Conn Open?
Aug 13 2004 12:27 PM
I was reading an article found here (http://www.c-sharpcorner.com/Code/2003/July/DAC4SQLServerInCSharp.asp) about creating a generic data access component. About 2/3's the way down the page, the author returns a SqlDataReader from a function. When this function is called and the SqlDataReader is returned, wouldn't it leave a connection open? I'm envisioning the usage being DataGrid.DataSource = the SqlDataReader returning function. I can't seem to find a solid answer out there with the necessary info. I have read that the command behaviour will close it for you but in order to trigger the behaviour, wouldn't the SqlDataReader.Close() still have to be called? Your guidance in appreciated, Many thanks in advance, Adam
Reply
Answers (
2
)
Stumped on Datagrid Edit enlightenment needed...
Cannot download any file from the zip file links