Dick,
Beside the by Kerry told executescalar there is as well the datareader,
which gives you a row back from the resultset. There are more kind of
adapters, however those are generated using the dataadapter (while the
dataadapter is in fact using the datareader).
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader(VS.71).aspx
Cor
"Dick Swager" <(E-Mail Removed)> schreef in bericht
news:B9193235-1D2B-487E-83A0-(E-Mail Removed)...
> Is there a way to use a DataAdapter to retrieve data via an SQL function?
> I have done what I need to do using a stored procedure that returns a 1x1
> table, but it seems like it would be much cleaner if the single value
> returned by a function could be obtained. Maybe there is some mechanism
> other than a DataAdapter. I've been away from this stuff for a while and
> I'm trying to re-learn a lot of the C++ / SQL interaction stuff with .NET.
>
> Dick
|