can i return sqlDatareader from a webservice
-
to pass data to my client must i use the dataset only is the sqlDatareader a valid return type from a web service??
I don't think the
SqlDataReader
class is a good one to pass as a return type. This class is used to read data from the DBase, and it's strongly connected with the Database connection. I'm not sure it'll work (you'll be able to read data from dbase) if you send the object as a result. Definetely it's not the right way. -- Mariusz 'mAv' Wójcik master e-software engineer (BPC) -
I don't think the
SqlDataReader
class is a good one to pass as a return type. This class is used to read data from the DBase, and it's strongly connected with the Database connection. I'm not sure it'll work (you'll be able to read data from dbase) if you send the object as a result. Definetely it's not the right way. -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)you can return a datatable or populated dataset but not a datareader as it requires an active connection to the database. Just populate a datatable with the info and return that. Definitely a PEBCAK! (Problem Exists Between Keyboard And Chair)
My First ASP.Net site is now up :) RedRavenRPG