Re: not sure how to describe this question...

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Supporting multiple people responsible for multiple in a database may be
simple to you but not to newbie's like myself. Do you have either a
reference to describe some techniques or an example? Thanks.
--
Dennis in Houston


"GhostInAK" wrote:

Hello mattdaddym@xxxxxxxxx,
All the other suggestions about database storage are good. A database model
that supports multiple people responsible for multiple entities is a fairly
simple construct.

An aspect that hasnt been addressed is what to do with the data. Newbies
will probably tell you to read the data from the DB on each page load. YUK.
Or they might say read it on the first page load and store the data in session
variable/s. Equally YUK. Look into Forms/Windows Authentication. I can't
remember off the top of my head what the object is, though I think it's Page.Identity.
You populate this at session start.. then you can figure out what the user
is allowed to do by asking Page.identity.InRole (or IsInRoll ).. anyhow..
you get the idea.

Take care,
-Boo

Hi all,

I'm writing an application in asp .net and vb .net. The question I
have just verifies I need to take an official programming course
instead of this "learning on the fly" stuff :)

Here's the situation. I have a site that people will access from
different site codes (site code = building ID). Each user will have a
profile, and permissions to the system based on the profile. The user
currently can only makes changes to the database for the site
code(building) he/she resides in. I'd like to be able to add the
ability to make a user responsible for several sites. So, for now, I
have an sql database with a site_code column that holds the id of the
site for the user.

The issue I am having is how to manage multiple site codes for a user
when I don't know if he/she will be responsible for 1,2,3,4, or more
sites. Here is what makes sense to me, and I appreciate any input on
this.

I should be able to store the one or more site codes the user has
access to in one database column. Maybe delimited by spaces or commas
or I don't know.

When I load these site codes, should I use some kind of array or
collection? Now we are getting into the asp .net part. I need to store
this information in session so it is available across pages. Eitehr
way, when I get to a routine where I need to check the site codes a
user has permission to, I should be able to do something like:

For each site_code in <something>
'check whatever against the site code and determine what should be
done
Next

Am I making any sense? I am inexperienced with this kind of thing.
Thank you!




.



Relevant Pages

  • Re: not sure how to describe this question...
    ... I frequently see people who try to put comma separated data into a database field. ... If you put all sites for a person in a single field, that field is more or less useless for database operations. ... If you store the information in a separate table, you just join the tables in a query, and you get the information fast and simple. ... The issue I am having is how to manage multiple site codes for a user ...
    (microsoft.public.dotnet.languages.vb)
  • Re: not sure how to describe this question...
    ... A database model that supports multiple people responsible for multiple entities is a fairly simple construct. ... Or they might say read it on the first page load and store the data in session variable/s. ... The issue I am having is how to manage multiple site codes for a user ...
    (microsoft.public.dotnet.languages.vb)
  • Re: not sure how to describe this question...
    ... Good idea but how do you handle multiple persons responsible for multiple ... When using delimiters in a table column, I have been able to conduct ... or less useless for database operations. ... The issue I am having is how to manage multiple site codes for a user ...
    (microsoft.public.dotnet.languages.vb)
  • not sure how to describe this question...
    ... I'm writing an application in asp .net and vb .net. ... have an sql database with a site_code column that holds the id of the ... The issue I am having is how to manage multiple site codes for a user ... I should be able to store the one or more site codes the user has ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Question about remote objects
    ... database service with connection to database ... client manager to service logins from client workstations ... the server. ... a row read in from the database, and with multiple users running multiple ...
    (comp.lang.python)