Solved

CAnnot open shared memory

Posted on 2010-11-20
5
1,419 Views
Last Modified: 2012-05-10
I have a working program that I am testing on a PCVirtual Windows7 32bit clean install. The program works fine on the dev machine but on the test system I get the error " Cannot open shared memory region'
However if I run the program as an administrator (right click on the exe) it works fine.

The database is a SQL Server Compact 3.5 sdf there is no password, user etc. that is installed into the application folder in "Program Files"

 My connection string is "Data Source=|DataDirectory|\NewSummit.sdf"

I am using VS2010


Any ideas?
0
Comment
Question by:milkwood
  • 2
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
0
 
LVL 68

Expert Comment

by:Qlemo
Comment Utility
Are you using Shared Memory yourself, or is this message triggered by database access? If the latter, just disable Shared Memory and allow (only) for TCP connection in SQL Server network settings for both client and server drivers.
0
 

Author Comment

by:milkwood
Comment Utility
Codecruiser
Yes, I have an identical problem. The message is received after the connection string is initialized. The machines that the program will be eventually run on cannot be relied on to be administrators, unlikely in fact.

I have tried putting the database in the ProgramData subdirectory on the client machine with the same effect.

I have had the installation program "Download prequisites from the Vendors installation site",  which is a pain, the same result.

The only way I can the program to work is with a right click

0
 

Author Comment

by:milkwood
Comment Utility
I have found that if the setup program installs into a directory ie. [WindowsVolume]\SummitSoilRecs the program works fine.

 It seems too easy, what would be the downside?
0
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
No downside. It is just "non-standard", and no folder redirection is applied - that means the data and config stays the same for all users, which is probably the intended behaviour.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

763 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