If I am reproducing your steps correctly, I see that SSMS will 'auto-magically' write a query for one of the CRUD actions -but it's not a stored procedure.
You may wish to combine that action with using a Stored Procedure template -but as far as I can determine, you'll have to manually remove the dbname.
|||Could you please post the script you see, and the version of SQL Server you are using?
You can try it on a simple table and not necessary your primary one.
When I try to reproduce your problem, the CRUD script created has a "use [<dbname>]" at the beginning of it. If this is the case for you, you can simply remove this line from the script and it will be applicable to any database.
|||Why not use Edit / Find and Replace after you generate the script?
No comments:
Post a Comment