Sharing Violation 
Author Message
 Sharing Violation

I'm developing an application using C++ MFC. I
created the ADO database application using the wizard in
VS 6.0 and then ported it to

I have recently taken more control of the database.
I now create the database myself in my derived
CWinApp::InitInstance() method prior to calling the

The ProcessShellCommand(cmdInfo)function however still
opens the database which causes a sharing violation.

Interesting that I only get this sharing violation when I
open the app by clicking on the database. It doesn't
occur when I open the app and provide the database name
from a user dialog in the app.

How can I stop the ProcessShellCommand(cmdInfo)from
opening the database or at least opening it shared.

Or is there a better solution that doen't require me to
totally unraved my design.


Sat, 10 Dec 2005 00:14:17 GMT  
 [ 1 post ] 

 Relevant Pages 

1. File Sharing Violations

2. trapping Sharing Violation errors?

3. fopen -- detect sharing violation

4. NTService File Sharing Violation

5. HELP: exe sharing violation on a Personal Netware network

6. sharing violation exception when using FIle Open menu option

7. Self-Inflicted Sharing Violation ?

8. shfileoperation sharing violation when creating directories

9. How to avoid File Sharing Violation error

10. Set File Sharing Violation ?

11. Sharing Violation

12. How to avoid sharing violation when two processes write to the same file


Powered by phpBB® Forum Software