Re: Connection object question



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.


.



Relevant Pages

  • RE: WSS install locked into MSDE DB - Can not install for SQL Serv
    ... For the MASTER database ... Althought we change the Configuration Application pool several times ... interface BUT they appear to be MSDE databases and not SQL Server databases. ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: How to Replicate an SQL Server 2000 Database
    ... actual server name) enterprise manager should associate the database with the ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.replication)
  • Re: SQL 2005 Best Practice vs SQL 2000: Application Files Separate from data (and log) files
    ... I have had quite a number of clients that used a SAN for a database server and suffered significant performance problems because their underlying SAN infrastructure was a huge stripe across many drives. ... By application files I mean the binn folder which contains the sql server executable among other things. ...
    (microsoft.public.sqlserver.setup)
  • RE: Need help with copy database
    ... in the event log for the server SQL was running on. ... This was a username from the database ... SQL Server Agent service is run with a domain account that has full admin ... if @backupSetId is null begin raiserror(N''Verify failed. ...
    (microsoft.public.sqlserver.dts)
  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Check the database connection information and make sure that the database ... Uninstall SQL Server; ... Reinstall Monitoring and Sharepoint and make sure they work; ...
    (microsoft.public.windows.server.sbs)