Hi,
I have a stored procedure on SQL Server 2005 which runs a select on 5
columns. I want to return these rows to the .NET 3.5 C# program.
I have 2 questions:
1. In the sproc - do I need an OUTPUT parameter and if yes, what type
should this be? Or do I just run the select with no OUTPUT parameter?
2. On the application layer I am using the following to capture the
output:
SqlParameter paramOut = new SqlParameter("@ ohlc", SqlDbType.VarCh ar,
-1);
paramOut.Direct ion = ParameterDirect ion.Output;
sqlComm.Paramet ers.Add(paramOu t);
Problem is though I'm unsure of the type for the SqlDbType parameter?
I would appreciate any help any can offer me here with this?
Any comments/suggestions/help would be greatly appreciated.
Al.
I have a stored procedure on SQL Server 2005 which runs a select on 5
columns. I want to return these rows to the .NET 3.5 C# program.
I have 2 questions:
1. In the sproc - do I need an OUTPUT parameter and if yes, what type
should this be? Or do I just run the select with no OUTPUT parameter?
2. On the application layer I am using the following to capture the
output:
SqlParameter paramOut = new SqlParameter("@ ohlc", SqlDbType.VarCh ar,
-1);
paramOut.Direct ion = ParameterDirect ion.Output;
sqlComm.Paramet ers.Add(paramOu t);
Problem is though I'm unsure of the type for the SqlDbType parameter?
I would appreciate any help any can offer me here with this?
Any comments/suggestions/help would be greatly appreciated.
Al.
Comment