[SQL Map] What does HandleParams do ?

[SQL Map] What does HandleParams do ?

  
Forge Component
(18)
Published on 2014-10-20 by Paulo Ramos
18 votes
Published on 2014-10-20 by Paulo Ramos
What does HandleParams do?
Hi Leo!

It just adds some placeholders for defining local variables, in case you're testing your query in SQL Management Studio (or other client). It only affects queries having input parameters.

For example:

select * from {USER} where {USER}.[Id] = @UserId

will be converted to:

--SQLMap Params: Begin--
/* ToDo: fill parameter types and values */
declare @UserId 
set @UserId = 
--SQLMap Params: End--
select * from ossys_user where ossys_user.[Id] = @UserId

You still have to enter the variables types and values when testing.