Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Unanswered: Updating from Excel file

    Hi, I m trying to update a table using an Excel file using the following code:
    [sql]
    UPDATE cargo
    SET cargo.slot = ( SELECT two
    FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\excel\test.xls";Extended properties=Excel 5.0')...Sheet1$
    WHERE cargo.container = one)

    WHERE EXISTS ( SELECT two
    FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0','Data Source="c:\excel\test.xls";Extended properties=Excel 5.0')...Sheet1$
    WHERE cargo.container = one)

    select container,slot from cargo
    [sql]
    Now, I have two similar databases, and both contain all the fields necessary for this operation and these fields are identical.
    However on one table it works perfectly, on the other it gives an error:

    MSDTC on server 'SCRBSQLITGTO002' is unavailable.

    The server I am running is the only sql 2000 server we have, so it is cannot be in cluster mode.
    Can anyone help?
    Thanks
    Azh

  2. #2
    Join Date
    Feb 2004
    Posts
    2

    solved

    I solved it by activating the Distributed Transation Cordinatoor in Enterprise manager under Support Services.
    This has to be active even tho my server is not in a cluster, and is not configured as a cluster.
    Wierd...
    Bye!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •