Thanks I didn't realise the reader's got to be closed first. Jesper, that
explains why creating a DataSet also works cause the connection is closed.
"Teemu Keiski" <joteke@aspalliance.com> wrote in message
news:%23ndA2ulPEHA.1276@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hi,
>
> did you close the DataReader before reading the parameters? You need to
> close it first.
>
> --
> Teemu Keiski
> MCP, Microsoft MVP (ASP.NET), AspInsiders member
> ASP.NET Forum Moderator, AspAlliance Columnist
>
http://blogs.aspadvice.com/joteke
>
>
> "Janaka" <janaka@magicalia.com> wrote in message
> news:eJzBbrlPEHA.2716@tk2msftngp13.phx.gbl...[color=green]
> > Hi this is kind of an ASP.NET/ADO.NET question. I've got a stored[/color]
> procedure[color=green]
> > on SQL Server that returns a results set. It also sets 3 output[/color]
> parameters[color=green]
> > in a seperate Select statement. When checking this on the database it
> > returns all the results and output parameters. Now when I set up my
> > SqlCommand objects parameters I specify 2 input and 3 output parameters.[/color]
> It[color=green]
> > executes and returns a SqlDataReader which works fine. However when I[/color][/color]
go[color=blue]
> to[color=green]
> > read the parameter values they are always null? Does anyone know why[/color][/color]
you[color=blue][color=green]
> > cannot get output parameters with a results set?
> >
> > Thanks, J
> >
> >[/color]
>
>[/color]