Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to validate stored procedure/function parameter list in SQL script?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-29 : 09:33:13
Shilpa writes "SQL Server tools provide syntax checking, but i can't find a way to check if a call to a stored procedure or function is actually passing parameters of the right types (allowing for default parameter values, named parameters, etc.), without actually having that code execute. Is there some tool to do this check for every line of code in a database, in stored procedures, user-defined functions, triggers, etc.?"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-05-29 : 12:12:28
Well, there's a very good test to see if that problem exists: run the code! If these kinds of errors exist, they'll most likely abort the procedure, and the error message will tell you exactly what happened and where. There's no way an external tool could do this WITHOUT executing the code anyway, and even then, you'd STILL have to go in manually and fix it.

There's no quick fix for this. Proper procedure usage is a hallmark of good programming skills, you have to learn it by doing, not by having some wizard check your code for you.

Go to Top of Page
   

- Advertisement -