"Correct" place to stopre data files?

  • Thread starter Thread starter Mitchell Vincent
  • Start date Start date
M

Mitchell Vincent

I've been somewhat confused about what the "proper" place is to store
data files (like file based databases) for my applications.

With all the different "special" folders available, which is the correct
one for databases that get updated every time a user runs the
application? I need to make sure that Windows 98 users can use my
software as well, but I also need make sure that the data file is always
accessible at a consistent location in my software.

Any tips appreciated!
 
You should be able to write to the Application.UserAppDataPath folder
safely.
 
Marina said:
You should be able to write to the Application.UserAppDataPath folder
safely.

Is that accessible to "all users"? I always install my software so that
any user on the system can access it.
 
Yes, this will be stored in each users's data directory. Try it out and run
some quick test to see if it meets your needs.
 
Mitchel,

Although not correct is the application.startuppath as well not a bad place.
We see it Microsoft do with Visual Studio Net.

I hope this helps,

Cor
 
Mitchell Vincent said:
Is that accessible to "all users"? I always install my software so that
any user on the system can access it.

Use
'Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)'
instead.
 
Herfried said:
Use
'Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)'
instead.

I assume it works with Windows 98, but where is the actual directory on
a 98 box? I don't have one to test, or I would.

Thanks!
 
Cor said:
Mitchel,

Although not correct is the application.startuppath as well not a bad place.
We see it Microsoft do with Visual Studio Net.

I hope this helps,

Cor

That's what I do now, but I was thinking that in some multi-user setups
the user might not be able to write to the Program Files directory, so
all the writes to the database *could* fail in theory.
 
Hi

I think in win98, it should be the directory similar with below
CSIDL_COMMON_APPDATA,CommonApplicationData
C:\WINDOWS\All Users\Application Data

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top