Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd.CommandType = CommandType.Text;
- cmd.Parameters.AddWithValue("@id", ...); // your id arg
- cmd.Parameters.AddWithValue(... , ...); // your other args...
- cmd.CommandText = @"
- DECLARE @TaskType int -- or whatever
- SELECT @TaskType = // some existing query based on @id
- EXEC getrecords @TaskType, ...
- ";
- CREATE FUNCTION dbo.TaskType()
- Returns int
- SELECT ... stuff that gets task type
- END
- DECLARE tasktype int
- SELECT tasktype = dbo.TaskType
Add Comment
Please, Sign In to add comment