How can i fill the result of an sql query into a string variable in .net
i just want t开发者_JAVA百科o get the result of an sql query into a string variable.how is it possible in c# (.net) wihout using datatables. query like this Select Routine_name, Routine_Definition From Information_Schema.Routines Where Routine_Name = 'sp_sudh'
There is a simple read example returning data as a string here. Without knowing how you are querying the DB (whether you use stored procedure or dynamic SQL, for example) it's hard to answer with much more precision. The analogous ADO.Net Stored Procedure tutorial is here.
精彩评论