views:

127

answers:

1

I have a simple question.

I need to return results as simple text, either as a string or similar.

ie I want the same behaviour such as

Results to Text (Cntrl + T)

when you run a Query from SQL Server Management Studio.

How can this be done programatically against calling a Stored Proc from C#?

ie similar to ExecuteReader(); or ExecuteXMLReader(); but returning a string instead.

Is there some ToString() available?

Thanks, Kai.

A: 

No, you will have to build the sting yourself by reading from dbreader.

Alex Reitbort
What do you mean by "dbreader"? I looked in system.data.sqlclient and system.data.common namespaces but couldn't find anything. Thanks!
jan
i meant System.Data.Common.DbDataReader which is base of all DataReaders(sql, oracle, etc) in .Net
Alex Reitbort