SqlDataReader

12/08/2004 - 14:30 por Edith | Informe spam
Hola a todos.!!
Estoy realizando un WEB Service y tengo una función que como salida sea un
DataReader.
Y cuando ejecuto el Web Service me tira el siguiente error :
System.Data.SqlClient.SqlDataReader cannot be serialized because it does not
have a default public constructor.

Alguien me podrá ayudar.? Yo realicé lo siguiente :
<WebMethod()> Public Function notas(ByVal pusuario1 As String) As
SqlDataReader

'Conexion

Dim conexionstring As String = StringdeConexion

Dim sqlConnection As SqlConnection = New SqlConnection(conexionstring)

'Sentencia

Dim querystring As String

querystring = "select [notas].* from [s680101] where [notas].s68usuario @usuario "

'Comando

Dim comando As SqlCommand

comando = New SqlCommand(querystring, sqlConnection)

comando.Parameters.Add("@usuario", SqlDbType.Char).Value = pusuario1

'Abro la conexion

sqlConnection.Open()

notas = comando.ExecuteReader()

End Function


Gracias.
 

Preguntas similares