Solved

Excel 2007 - ADO - Provider=Microsoft.Jet.OLEDB.4.0 not working for Shared workbook

Posted on 2010-09-03
4
831 Views
Last Modified: 2012-06-27
In a shared workbook that on startup contains only empty workbooks. At runtime [Sheet1$] is populated on the fly. However after this I try and establish an ADO connection using the Jet engine and peform a SELECT * FROM [Sheet1$].  My select statement cannot find any records on [Sheet1$] even though I can see them on the sheet.

This code will work fine on non-shared copy of the workbook.

Help would be very welcome.  Thanks.
0
Comment
Question by:gerry_ocallaghan
  • 2
4 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 250 total points
Comment Utility
Has the workbook been saved since the data was added to Sheet1?
0
 

Author Comment

by:gerry_ocallaghan
Comment Utility
Hi Webtubbs.
I found that executing the Save method will resolve this issue. However I dont want to perform this action as it's a shared workbook (a report) and I don't want subsequent users opening it and seeing results.
When I remove the shared workbook flag it will work as expected even without the Save method.
However when I mark as shared under Reveiw>>Share Workbook it will not work (unless I execute the Save method).

I read somewhere else that there is a known issue using Jet Provider for ADO on shared workbooks. However the article did not mention a workaround.

Thanks.
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 250 total points
Comment Utility
The consensus opinion of Experts here is that using 'share workbook' should be assiduously avoided.  This is a poorly implemented feature in Excel that leaves workbooks highly vulnerable to corruption.  If true multi-user capability truly is needed, then the best practice is to use a database platform such as Access, SQL Server, MySQL, etc.Just about the only use for shared workbooks endorsed by the Experts here is to enable 'track changes',and even then, the workbook should still not be used by multiple users at the same time.It is only a small exagerration to say that there are only two kinds of shared workbooks: those that havebecome corrupted, and those that soon will be :)
0
 

Author Closing Comment

by:gerry_ocallaghan
Comment Utility
Thanks for comments experts. Your solutions are accurate but do not completely solve my issue.  I appreciate the advise though.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now