i have created a single account software,But i need separate database (using ms access database) for separate company user account. how to create Please Help me. i have attached the screen short
ex : company name
1. mva account 2011-2012
2.mva account 2012-2013
3 rama trading account 12-13
Akkiraju IvaturiPosted Sep 21, 2012, 10:23 PM
follow these steps:
1. Create a database with whatever tables you want to use for each customer or user account. Imagine this as a template and you should not be using this. For example, call it "Master.MDB".
2. You need to have login details and customer details stored in one more database. Call this as "Customer.MDB".
3. So, your user account table should have following columns
UserID ShortName LongName
===== ======== ========
1 ADMRM A.D.Modern Rice Mill
2 CTA Chandru Trading Account
Make sure that ShortName is unique.
4. Whenever you create a new user, create a new folder with user id. For example user1 is getting created, then create a folder with name "User1".
Then copy the "Master.DB" file to the folder path C:\User1 as below with database name as shortname.mdb:
System.IO.File.Copy(@"C:\MDB\FPNWIND.MDB", @"C:\User1\ADRM.MDB");
5. Whenever a user logins into the system, make sure that you connect to the database using datasource pointing to the location with the format
"C:\" + userid + selected account shortname + ".mdb" and use this mdb file for storing the whatever you are planning.
This makes sure that you create a new database for each user and for each account and you should be able to use it too.
There are some examples given if you google regarding create mdb file using COM components and others which you do not need to follow.
Let me know if you have any questions.
arun kumarPosted Sep 21, 2012, 3:45 AM
ex:
my data base name is 1.mdb
1st user data base is rec_1.mdb
2nd user data base is rec_2.mdb
etc..
please help me
Akkiraju IvaturiPosted Sep 20, 2012, 11:53 AM