Thank You for your help - this got me a little further.
I Dimensioned maxno as an objext
i tried making it an integer and it errored out. The problem is now that it
is an object i am not able to work with the value - i tried assigning it to a
text box and i got the following error:
Exception Details: System.InvalidCastException: Cast from type
'SqlDataReader' to type 'String' is not valid.
Source Error:
Line 238: End If
Line 239: Label11.Text = Sql
Line 240: lblextra.Text = MaxPO <-----Problem line
Line 241: End Sub
Line 242:End Class
try MaxPo.ToString();
or convert.ToString(MaxPO);

Signature
Regards,
Hermit Dave (D'way)
http://hdave.blogspot.com
(I hear what you're saying.. but lets try it my way first)
> Thank You for your help - this got me a little further.
>
[quoted text clipped - 34 lines]
> > >
> > > any help would be appreciated
PCL - 28 Oct 2004 14:55 GMT
My ongoing saga to return a value from a stored procedure - i switched from
using data reader to using a dataadapter. I now am able to assign a textbox
the number of records returned by the Stored procedure with:
txtExtra.Text = DS.Tables("PO").Rows.Count
it returns 1 which is what i expect - i want to actually store the value of
the stored procedure returns (it is a simple SQL - Select Max(po) from PODB)
i tried the following line and it returns nothing:
txtExtra.Text = DS.Tables("PO").Rows(0).Item(0).ToString()
i tried
txtExtra.Text = DS.Tables("PO").Rows(1).Item(1).ToString()
and i get an error which tells me there is now row 1.
Any help would be greatly appreciated - it is frustrating - i feel i am
very close yet so far away....
> try MaxPo.ToString();
> or convert.ToString(MaxPO);
[quoted text clipped - 41 lines]
> > > >
> > > > any help would be appreciated