May 10, 2011 at 11:45 am
I'm pretty sure I've asked this question before, but when I searched through all of My Posts I couldn't find my question, so please forgive me for asking it again. I had some additional information I wanted to ask anyway.
I'm going to start work on a major rerewritef an old (10+ years) VB6 application. The old app uses MS Access 2000. I want to migrate the data, schema, etc, to SQL Server 2008 Express. The big question is where should this database go. I want it in a location where the logged in user has access to it, each user would therefore have their own copy of the database, etc. The data shouldn't get too large, so that shouldn't be an issue.
Up to this point is what I've asked before. Now for the additional information I'd like to ask about. THere's going to be a mixture of Windows OS's involved; everything from Windows XP Professional to Windows 7. So, I'd like to know what's the propert environmental variable to use, to point to where the database should be stored. I'm sure that the actual, physical location will be different between OS's, so that's why I want to use an environmental variable. What should I use, please?
Kindest Regards, Rod Connect with me on LinkedIn.
May 11, 2011 at 12:44 pm
Are you going to create a new database for each user?
The installation process can copy database to any location that you want and then you can attach the database using AttachDBFileName switch in connection string. Each user would use a different database.
The other option is to use single database and create a security model in it preventing users from peeking into their data or modifying it. It depends on your requirements though.
Ask yourself if SQL Server Express is really what you need. Maybe you can do with one of the 'personal' databases, like SQLLite.
Regards
Piotr
...and your only reply is slàinte mhath
May 11, 2011 at 2:52 pm
You could store something like this in the registry for each user, under their own key structure.
In terms of being separate for each user of a PC (multiple possible users), you have a couple issues. One is that each installation on that PC would need a new instance name, AFAIK. Also, the paths would need to be different.
You could just store things in My Documents as well, which should be separate for each user.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply