473,405 Members | 2,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Best way to pass sqldatareader?

Hey all-
I've done some reading and came accross a few different sources that say
it's not a good idea to pass sqlDataReaders. This is fine, but how are you
really suppost to do this then?

In my current app I created a Class and then created a few custom functions
that return datareaders. Would somone share with me how I really need to be
doing this?

Thanks,
Doug
Nov 19 '05 #1
1 1001
Uncle Chutney sez "There is an exception to every rule. Except this one."
I've done some reading and came accross a few different sources that say
it's not a good idea to pass sqlDataReaders.
It isn't a hard and fast rule. On the other hand, if you have to ask, you
should probably follow it.
This is fine, but how are you
really suppost to do this then?
Use DataTables or DataSets instead?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Lawnmower Gangster" <La***************@discussions.microsoft.com> wrote in
message news:C7**********************************@microsof t.com... Hey all-
I've done some reading and came accross a few different sources that say
it's not a good idea to pass sqlDataReaders. This is fine, but how are
you
really suppost to do this then?

In my current app I created a Class and then created a few custom
functions
that return datareaders. Would somone share with me how I really need to
be
doing this?

Thanks,
Doug

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Jay Douglas | last post by:
Hello, I am needing to pass a class object (this) by reference to a method in a different class. When I do the following code I get the error (Cannot pass '<this>' as a ref or out argument because...
3
by: Gidi | last post by:
Hello, i writing a application in C#, i have dataGrid that connect to DataSet and DataAdapter that takes data from my sql dataBase, the problem is that the form is loaded very very slow, i heared...
2
by: Joe Bloggs | last post by:
I have a general question on best practice regarding data access. I have the code below, a static method defined in a class that I use in a data layer dll. The method takes a string as its...
2
by: jason | last post by:
the enterprise is going to eventually convert the existing ASP Classic website to ASP.NET until that time, development has already begun for a C# library of business objects. for the most part,...
7
by: Cory Toms | last post by:
Hey All, I have question about the best way to go about doint this: SqlDataReader _dr=components.getItems(); fooclass _myarray = new fooclass; //create new array of my class int i=0; ...
2
by: msn | last post by:
What is the best way to connect to a sql database in a asp.net page with Visual studio. An example would be great. Thanks Dave
3
by: msnews | last post by:
Hi All, I have the following code ------------------------------------------------ Business.Prod prod = new Business.Prod(); SqlDataReader Product = prod.GetProducts(); while (prod.Read())...
4
by: James Radke | last post by:
Hello, I am looking for guidance on best practices to incorporate effective and complete error handling in an application written in VB.NET. If I have the following function in a class module...
5
by: =?Utf-8?B?SkI=?= | last post by:
Hello I am passing an arraylist to be filled with data from pgm1 to pgm2 to pgm3 where it gets filled, then I pass it back from pgm3 to pgm2 to pgm1 where I will use the data from arraylist. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.