Solved

CAnnot open shared memory

Posted on 2010-11-20
5
1,451 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
ID: 34180308
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 34180338
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
ID: 34181915
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
ID: 34182019
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 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 34182691
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

803 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