Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
anissw
Starting Member
2 Posts |
Posted - 2012-10-21 : 17:57:21
|
I have 18 single databases that are data entry applications for 18 sites in Microsoft Access. We are going to move to SQL Server 2008 and I have already imported the Access tables into one SQL table. In testing, I used the Access forms as the front end and attempted to login under different user login, however, data is displayed for all sites instead of based on the user site's login. How do I implement the data/tables/forms to display based on the user's login? Each site has about 3 people that will need to access one table, but needs to display their site's data and be able to conduct data entry.Thank youNeecy |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-10-21 : 20:41:00
|
Depending on your needs, you may need to add one or two columns to your table in the SQL Server. If you just need to filter the data based on the login, you should add a column to indicate the login and store that information when data is stored. When you store the data, depending on which client the data is coming from, you would populate this column. There are a number of built-in functions that will let you get the current user name - SYSTEM_USER for example. When you query, you would query based on the login name as well (i.e., add a where clause that is something like WHERE loginname = SYSTEM_USER) |
|
|
anissw
Starting Member
2 Posts |
Posted - 2012-10-22 : 16:15:48
|
Thanks- I'll apply that and let you know the status. Depending on your needs, you may need to add one or two columns to your table in the SQL Server. If you just need to filter the data based on the login, you should add a column to indicate the login and store that information when data is stored. When you store the data, depending on which client the data is coming from, you would populate this column. There are a number of built-in functions that will let you get the current user name - SYSTEM_USER for example. When you query, you would query based on the login name as well (i.e., add a where clause that is something like WHERE loginname = SYSTEM_USER) [/quote]Neecy |
|
|
|
|
|
|
|