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
Solved

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

Posted on 2010-09-03
4
861 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
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

856 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