Re: Stored procedure in Dynamic DB
- From: "Roy" <roy@xxxxxxxxxxx>
- Date: Fri, 5 Aug 2005 22:29:37 -0400
You are right and the sql server suppose to do this but it can't do this
..... I have created the database dynamically and after I used USE command
and then Created all the stored procedures after but it was giving me an an
error which I stated in earlier email.
Thanks
"David Gugick" <david.gugick-nospam@xxxxxxxxx> wrote in message
news:uTQLm24kFHA.1412@xxxxxxxxxxxxxxxxxxxxxxx
> msnews.microsoft.com wrote:
> > Yes David, that's what I am asking you.... I am creating dynamic
> > database and after creating the database I want to create procedures
> > in it .... database created successfully and records have been
> > inserted successfully but when I try to create Stored Procedure then
> > there is giving me an error like I should in that database .... so
> > the question is that can I do this dynamically?
> >
>
> You can, but as I stated, you need to _be_ in that database first. So
> create the database and then change context to it using USE [New
> Database Name] and then create the procedures. I can't tell from your
> post whether or not this is run as a single script or there is a client
> application at work here. If you have an application driving the
> creation of the database, then do this:
>
> - Connect to the server
> - Execute the CREATE DATABASE script
> - Change context to the new database using a USE statement
> - Execute the scripts to create the stored procedures and leave off the
> database name
>
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com
>
.
- Follow-Ups:
- Re: Stored procedure in Dynamic DB
- From: dtsuser
- Re: Stored procedure in Dynamic DB
- Prev by Date: Re: How can I use MDX functions in SQL Query Analyzer (Client Tool)
- Next by Date: Security issue
- Previous by thread: How can I use MDX functions in SQL Query Analyzer (Client Tool)
- Next by thread: Re: Stored procedure in Dynamic DB
- Index(es):
Relevant Pages
|
Loading