Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-03
4
Medium Priority
?
879 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 750 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 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 750 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 Admins - 7 Day Trial

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
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.

721 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