|
-
Nov 14th, 2006, 10:49 AM
#1
Pass Schema into a stored procedure?
OK, I have an application that can handle multiple site locations.
These locations each need their own independent data, so our solution was to create a new schema for each site. I have created a group of stored procedures in the dbo schema. When a new site is created, I create a new schema and a new user with that schema as their default. I then give that user Execute permissions on the stored precedures. This all works great up to one point.
I am able to create all the tables and their keys just fine, however I have a couple of tables that require some preinstalled data. I tried to have 2 procedures that contain insert statements, but for some reason, they are not being called against the default schema and are returning an error
Is there a way to pass a schema name into a stored procedure and then insert it before the table name in the procedure? Or is there some other way to do this that would be easier? I have tried this a few ways and keep getting errors.
Thanks for any help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|