Re: Connection object question
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Fri, 27 May 2005 19:29:59 -0700
The fastest way to perform an update is to do so on the server. If you're
changing existing rows from an external source I suggest moving the changes
(in the form of rows) to the server first. Next, execute a server-side
UPDATE that pulls the changes out of the imported table and applies the
changes. Moving the data to the server is accomplished with DTC or BCP. In
ADO 2.0 you'll be able to use the new SqlClient BulkCopy class--far easier.
I just wrote a program that imports 450,000 rows into SQL Server--it took
about 30 seconds.
I'll be showing attendees at the DevTeach conference how to do this in my
ADO.NET workshop (see my web site for details).
hth
--
____________________________________
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.
__________________________________
"Edward Diener" <eddielee_no_spam_here@xxxxxxxxxxxxxx> wrote in message
news:%23OaCarjYFHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
> Stephen Howe wrote:
>>>I need to do this programatically with ADO for my connection's database
>>>if it speeds up processing of the tables in the database.
>>
>>
>> It can be done but I highly doubt whether it would speed up processing.
>> You would not be able do it if someone else has a live connection and it
>> fairly severe option.
>> I looked into this myself about 4 years and and concluded it was not
>> worth
>> it.
>>
>> See thread
>> http://groups-beta.google.com/group/microsoft.public.sqlserver.programming/browse_frm/thread/b08db26efa156104/f27beff401d02f9f?q=SQL+server+exclusive+author:Stephen+author:Howe&rnum=1&hl=en#f27beff401d02f9f
>
> Thanks for the info. I will not worry about it then. Is there any
> information anywhere about the best programming ways using ADO of speeding
> access to SQL Server database tables when making changes ? I am writing
> code which will periodically be updating or inserting fairly large numbers
> of records in SQL Server 7 tables. I am just looking for some best
> practices for cutting down the time it will take to do this.
.
- Follow-Ups:
- Re: Connection object question
- From: Edward Diener
- Re: Connection object question
- References:
- Connection object question
- From: Edward Diener
- Re: Connection object question
- From: Mark J. McGinty
- Re: Connection object question
- From: Edward Diener
- Re: Connection object question
- From: Stephen Howe
- Re: Connection object question
- From: Edward Diener
- Re: Connection object question
- From: Stephen Howe
- Re: Connection object question
- From: Edward Diener
- Connection object question
- Prev by Date: Re: ADO connectstring for SQLServer not port 1433
- Next by Date: Re: ADODB.Recordset Open progress indicator
- Previous by thread: Re: Connection object question
- Next by thread: Re: Connection object question
- Index(es):
Relevant Pages
|
|