Re: Parameters after "FROM" & "DROP"
From: J McDermond (nospam_at_hotmail.com)
Date: 07/21/04
- Next message: torontodba: "migrating Oracle database to SQL Server 2000."
- Previous message: Ldraw: ".bas for VB no indexs or contraints"
- In reply to: Allan Mitchell: "Re: Parameters after "FROM" & "DROP""
- Next in thread: Mingqing Cheng [MSFT]: "Re: Parameters after "FROM" & "DROP""
- Reply: Mingqing Cheng [MSFT]: "Re: Parameters after "FROM" & "DROP""
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Jul 2004 16:19:38 -0400
Thanks for the link Al. I solved my issues...sort of...
My sql runs fine in query analyzer, both parses and executes with no
problems. However, when placed in my execute sql task, it shoots up this
enigmatic error:
Error Source: Microsoft OLE DB Provider for SQL Server
Error Description: Could not find prepared statement with handle 1.
Anyone else ever encounter this error?
"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:%23s2pgR1bEHA.1048@tk2msftngp13.phx.gbl...
> You would need to do this dynamically and the best article I can point you
> to is this one
>
> http://www.sommarskog.se/dynamic_sql.html
>
> --
> --
>
> Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
> www.SQLDTS.com - The site for all your DTS needs.
> www.konesans.com - Consultancy from the people who know
>
>
> "J McDermond" <nospam@hotmail.com> wrote in message
> news:2m7ri4Fjra6oU1@uni-berlin.de...
> > Hey all,
> >
> > First, if anyone would care to help me out in a post a few lines down
> > (subject is "can't use ? after FROM") I'd greatly appreciate it.
> >
> > But my main question is how does one dynamically set tablenames as
> > parameters after certain commands (alter, from, drop, etc...)? Is it
even
> > possible? I know I can't be the first to hit this barrier...
> >
> > For instance, a line in my execute sql task reads "DROP TABLE @TableVar"
> >
> > Naturally, it doesn't work. Suggestions anyone? Thanks.
> >
> >
>
>
- Next message: torontodba: "migrating Oracle database to SQL Server 2000."
- Previous message: Ldraw: ".bas for VB no indexs or contraints"
- In reply to: Allan Mitchell: "Re: Parameters after "FROM" & "DROP""
- Next in thread: Mingqing Cheng [MSFT]: "Re: Parameters after "FROM" & "DROP""
- Reply: Mingqing Cheng [MSFT]: "Re: Parameters after "FROM" & "DROP""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|