Batch Update ADO.Net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Derek Hart

    #1

    Batch Update ADO.Net

    Using SQL Server 2000, and VS.Net 2003

    I want to load a datatable from a local server into a dataset and update it
    into a linked server. The linked server will have the exact same structured
    table, and it will be empty. Can I open a blank dataset from the linked
    server, and fill it with the dataset from the local server? I have been
    trying every which way to get this working. Is it possible? It is too slow
    doing a transact sql statement that does the insert from the local to the
    linked, so I am trying this method. Any thoughts?

    Derek


  • Tasos Vogiatzoglou

    #2
    Re: Batch Update ADO.Net

    .... A more "SQL" approach

    EXEC sp_addlinkedser ver 'your server'
    EXEC sp_addlinkedsrv login 'your server', 'false', 'luser', 'rmtuser',
    'rmtPassword'


    SELECT * INTO YOUR_TABLE FROM YOUR_SERVER.DAT ABASE.dbo.TABLE

    or

    INSERT INTO YOUR_TABLE (COLUMNS) SELECT COLUMNS FROM
    YOUR_SERVER.DAT ABASE.dbo.TABLE


    Regards,
    Tasos

    Comment

    • Tasos Vogiatzoglou

      #3
      Re: Batch Update ADO.Net

      Forgot to mention that you should

      EXEC sp_dropserver 'your server', 'droplogins'

      after finishing.

      Tasos

      Comment

      Working...