Re: Using identity_insert in a stopred procedure with a variable
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Thu, 11 Aug 2005 09:31:23 -0700
ADO and ADO.NET are terrible at performing bulk copies. I suggest using
BulkCopy from within TSQL, DTS or the bulk copy utility. These can be
programmed to connect to any backend.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Remco" <remco@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:1123761644.017785.94930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> We're moving data from one database to another for archiving purposes.
> However, the name of the archive database varies from one installation
> to another and from one environment to another.
> Remco
>
> William (Bill) Vaughn wrote:
>> What's the underlying problem you're trying to solve with this approach?
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> www.betav.com/blog/billva
>> www.betav.com
>> Please reply only to the newsgroup so that others can benefit.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> __________________________________
>>
>> "Remco" <remco@xxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:1123704695.861715.64260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >I am using the SET IDENTITY_INSERT command in an SP. However, we need
>> > the table in the command to be in a different database, the name of
>> > which is passed to the SP in a variable.
>> >
>> > The command I am using would look like:
>> >
>> > EXEC( 'SET IDENTITY_INSERT ' + @dbname + '..tax_transaction ON' )
>> >
>> > However, this does not seem to work, as the following INSERT statement
>> > gives the error that IDENTITY_INSERT is set OFF.
>> >
>> > Any help is appreciated.
>> >
>
.
- Follow-Ups:
- References:
- Using identity_insert in a stopred procedure with a variable
- From: Remco
- Re: Using identity_insert in a stopred procedure with a variable
- From: William \(Bill\) Vaughn
- Re: Using identity_insert in a stopred procedure with a variable
- From: Remco
- Using identity_insert in a stopred procedure with a variable
- Prev by Date: Re: RowUpdated Exception
- Next by Date: Re: Using a Parameterized SelectCommand with OleDBDataAdapter
- Previous by thread: Re: Using identity_insert in a stopred procedure with a variable
- Next by thread: Re: Using identity_insert in a stopred procedure with a variable
- Index(es):
Relevant Pages
|