Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problems with ACE OLEDB provider

Greetings!

I am having difficulty updating an Excel worksheet via the ACE.OLEDB.12.0
provider.

I have this worksheet defined as a linked server in SQL Server via this
provider, and all attempts to update the lone worksheet in this file as a
linked server results in the following:

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel"
returned message "Bookmark is invalid.".
Msg 7346, Level 16, State 2, Line 1
Cannot get the data of the row from the OLE DB provider
"Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel".

The query:
update linked_excel...sheet1$ set error_col='hithere' where [code])='G'

However, when I try to perform precisely the same update against the same
source via openrowset, it works, to-wit:

update openrowset('Microsoft.ACE.OLEDB.12.0','Excel
12.0;HDR=yes;Database=f:\path_to_file\filename.xls x','select * from
[sheet1$]')
set error_col='hithere'
where [code]='G'

SELECT's performed against either version work properly.

The linked server behavior is consistent across SQL 2005 and 2008
installations. The OLEDB errors in the trace indicate a NotImplemented error
duing call to QueryInterface, but I have not been able to dig deeper than
that bit of information.

I would greatly appreciate any tips or help.

Many thanks,
-David

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Problems with ACE OLEDB provider

I would like to add some additional information on this problem.

As noted, Excel sheets created as linked servers from SQL Server via the ACE
OLEDB provider version 12 fail on table updates. Inserts and selects work.

I have found an odd twist to this.

I have prepared a simple console .NET 3.5 application that uses the same
OLEDB provider, and performs the identical update against the same sheet of
the same Excel 2007 spreadsheet, and the update statement works perfectly.

This would tend to suggest that there is a SQLServer-specific problem with
the way it is dealing with this linked server against this provider, but most
questions that involve the ACE provider are routed here (to Office-specific
forums). I can reproduce this error on SQL Server 2005 and 2008 boxes.

I have tried DBCC traceon(7300) to gain more information on the error, but
no additional information is provided. I have already added the
AllowInProcess and DynamicParameters registry entries as noted in other posts
describing similar behavior, but the presence/absence of these entries makes
no difference.

If anyone has any thoughts on this, I'd be most appreciative. I honestly
think we're dealing with a bug in SQL Server, because bypassing SQLServer
removes the problem - but that's not eliminating the possibility of a bug in
the way the ACE provider is interacting with it.

Help greatly appreciated.

-David
"default_user" wrote:

Greetings!

I am having difficulty updating an Excel worksheet via the ACE.OLEDB.12.0
provider.

I have this worksheet defined as a linked server in SQL Server via this
provider, and all attempts to update the lone worksheet in this file as a
linked server results in the following:

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel"
returned message "Bookmark is invalid.".
Msg 7346, Level 16, State 2, Line 1
Cannot get the data of the row from the OLE DB provider
"Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel".

The query:
update linked_excel...sheet1$ set error_col='hithere' where [code])='G'

However, when I try to perform precisely the same update against the same
source via openrowset, it works, to-wit:

update openrowset('Microsoft.ACE.OLEDB.12.0','Excel
12.0;HDR=yes;Database=f:\path_to_file\filename.xls x','select * from
[sheet1$]')
set error_col='hithere'
where [code]='G'

SELECT's performed against either version work properly.

The linked server behavior is consistent across SQL 2005 and 2008
installations. The OLEDB errors in the trace indicate a NotImplemented error
duing call to QueryInterface, but I have not been able to dig deeper than
that bit of information.

I would greatly appreciate any tips or help.

Many thanks,
-David

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OleDB Provider for Excel 2007 Binary (.xlsb) Rafael Excel Discussion (Misc queries) 1 December 19th 08 05:57 PM
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the l henry Excel Programming 0 December 6th 06 03:38 AM
Is there a diferent "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" George Excel Programming 1 April 16th 04 02:31 PM
Query OLEDB Provider for Excel file info? mike Excel Programming 5 January 15th 04 12:33 PM
Excel schema using Jet OLEDB Provider? mike Excel Programming 1 December 22nd 03 09:25 AM


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"