G
Guest
I am trying to create a stored procedure that has both input and output
parameters. The output is a set of rows from a table and is to be populated
into the dataset. I'm not sure if the following is correct.
Create Procedure ProcName @inputA varchar(50), @ds TABLE OUTPUT
As
SELECT * FROM Table1
WHERE Table1.inputA = @inputA
RETURN @ds
_________________________________
Should I declare the column definitions for the output parameter as what the
compiler had prompted. If yes, is the following correct ?
Create Procedure ProcName @inputA varchar(50), @ds TABLE OUTPUT
As
DECLARE @ds (title varchar(50), Language varchar(50))
SELECT * FROM Table1
WHERE Table1.inputA = @inputA
RETURN ds
___________________________________
"Language" is a column in the table but VS.NET treats it as being used by
the Microsoft Scripting Language for transformation (not sure what it's for).
There are also other columns in the table with names like "File Size" and I'm
getting the same highlights as the "Language" property. How should they be
declared ?
parameters. The output is a set of rows from a table and is to be populated
into the dataset. I'm not sure if the following is correct.
Create Procedure ProcName @inputA varchar(50), @ds TABLE OUTPUT
As
SELECT * FROM Table1
WHERE Table1.inputA = @inputA
RETURN @ds
_________________________________
Should I declare the column definitions for the output parameter as what the
compiler had prompted. If yes, is the following correct ?
Create Procedure ProcName @inputA varchar(50), @ds TABLE OUTPUT
As
DECLARE @ds (title varchar(50), Language varchar(50))
SELECT * FROM Table1
WHERE Table1.inputA = @inputA
RETURN ds
___________________________________
"Language" is a column in the table but VS.NET treats it as being used by
the Microsoft Scripting Language for transformation (not sure what it's for).
There are also other columns in the table with names like "File Size" and I'm
getting the same highlights as the "Language" property. How should they be
declared ?