I have a application that executes scripts (.SQL).
The user tells to the app the path where the script is and the app opens the script and saves the script to a variable, and then , this app as a stored procedure to where the variable value (the script text) is passed.
This works very well, but i have a problem....
When i have script that have inside stored procedures like :
EXEC sp_dbcmptlevel @dbname, 90
The app returns an error, because the sp_dbcmptlevel can only be executed in ad hoc context....
I do not what to send my SQL statments without being to a stored procedure, but not everything can be executed from inside a stored procedure....
Can you please help on what to do?