Solved

CAnnot open shared memory

Posted on 2010-11-20
5
1,503 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
[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
  • 2
5 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34180308
0
 
LVL 70

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 70

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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

624 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