Re: Help optimize Dataset copy code



Am Fri, 9 May 2008 17:06:47 +0100 schrieb notradamus:
....
I rolled my own function to copy records from one dataset to another, when
the datasets are in different databases, in my case - SQL Server 2005
(source) and Access 2003 (destination).
....
I find it too slow, probably due to the repeated Post call.

Is there a way to /speed/ things up? Can I delay the writes or use
TClientDataset or something like that? Any inputs greatly appreciated.


It would be ways faster if you use a "linked server" or OPENROWSET. Look
into the SQL Server Manual how to do this. With your access database as
linked server you can send a TSQL-command like "insert into
access.destinationTable (field1, field2, ..) select fieldA, fieldB, ...
from sqlserver.Sourcetable" to the SQL-Server. And the SQL-Server would
copy the data directly into the access table without the help of your
application. You app has only to send the command :-)

bye,
Helmut
.



Relevant Pages

  • Re: why>?
    ... On your desktop-- you'll be running SQL Server behind the scenes. ... it isn't risky to allow end users to create databases. ... it is no more risky than giving you the ability to create spreadsheets. ... I'm not saying that Oracle and IBM are going away. ...
    (microsoft.public.excel)
  • Re: Please answer my queries for fresh Installation
    ... Moving SQL Server Databases ... Using WITH MOVE in a Restore to a New Location with Detach/Attach ... Disaster Recovery Articles for SQL Server ...
    (microsoft.public.sqlserver.server)
  • Re: Please answer my queries for fresh Installation
    ... You can restore MSDB as well as master. ... > SQL Server, It will create Master, MSDB databases. ...
    (microsoft.public.sqlserver.server)
  • Re: Moving SQL Server 2000 from NT4.0 to Windows 2003
    ... Detach your existing user databases, ... user databases (or RESTORE) to the new server. ... > Hey Steve, ... Windows 2003 will not allow SQL Server SP less than 3. ...
    (microsoft.public.sqlserver.server)
  • Re: The best elegant solution to override 65k rows limit in a sheet
    ... MDB is friggin dead.. ... SQL Server has taken over the world. ... than read-only access to central company databases. ... I learned to write queries in Access after an hours' ...
    (microsoft.public.excel)