C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Interesting Facts about execute command in SQL Server
WhatsApp
Venkatesan Jayakantham
13y
7.8
k
0
1
25
Blog
Possible Error :
Procedure expects parameter '@handle' of type 'int'.
Reason for this error: From the error, you are able to predict that, the issue is due to the datatype. This issue may occur, if you are trying to execute a dynamic sql.
Try to execute the sql with sp_executesql.
Two options of executing to your sql
exec(@sql) or exec sp_executesql @sql
I've succeeded the above issue and caught up the below issue now,
Invalid use of side-effecting or time-dependent operator in 'EXECUTE STRING' within a function.
The reason is, I am trying to use the exec sp_execuesql method inside a function which is not accepted by SQL Server. Here is a fantastic guide for your apetite.
http://jimbojw.com/wiki/index.php?title=SQL_2005_-_Why_You_Can't_EXEC()_Inside_a_UDF
Cheers,
Venkatesan Prabu. J
Head, KaaShiv InfoTech,
http://www.kaashivinfotech.com/
Interesting Facts about execute command in SQL Server
People also reading
Membership not found