Solved

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

Posted on 2010-09-03
4
872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 47

Accepted Solution

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

Author Comment

by:gerry_ocallaghan
ID: 33597135
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
ID: 33597973
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
ID: 33609473
Thanks for comments experts. Your solutions are accurate but do not completely solve my issue.  I appreciate the advise though.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

734 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