Results 1 to 4 of 4

Thread: Creating tables with users with their own prperties

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455

    Question

    Dear VB users,

    I want to create a database with many tables.
    Not all users of the database may have access to a table or can only read the records. (no editing)
    Is it possible to create a database in VB with Users? Every users gets their own password with properties.

    if yes, can someone give me source how to create this.
    Is it possible to create, when the database is made, to create new users?

    Any information is welcome.


    Source:

    Set Db = Ws.CreateDatabase(DbSettings, dbLangGeneral)
    Set tdfNew = Db.CreateTableDef("Vendor")
    With tdfNew
    .Fields.Append .CreateField("VendorName", dbText)
    .Fields.Append .CreateField("VendorDate", dbDate)
    End With
    Db.TableDefs.Append tdfNew
    Db.Close


    Nice regards,

    Michelle.

  2. #2
    New Member
    Join Date
    Feb 2000
    Location
    Sydney,Australia
    Posts
    4
    Why not use ADOX. Books online has a copy of the Office 2000 Programmers Guide.

  3. #3
    New Member
    Join Date
    Jan 2000
    Posts
    9
    Here is one way you could accomplish this:

    Store in a binary file, the user's login id's and
    passwords. New users could be set up by a system
    administrator procedure. Also, store a table in
    your database wich login_id's and access levels.
    each time you open a database or write to a database,
    lookup the users access level in the table and make
    sure they have the correct permissions. For this to
    work, the first thing that would need to be done when
    your program starts is get the users login_id and password.
    validate this with the password in the binary file. Once
    the user has access, maintain a global variable that
    contains the users login_id. Now each time the user adds,
    updates, or deletes a record, you could check before this
    in the login_id/access level table to make sure the
    user has access to add, delete, or whatever. Your access
    levels could be just numbers that the programer uses
    to determine whether to let the user perform the following
    action. At my company we have 1-9 access levels. 1 being
    the lowest (view recs only) and 9 being the highest(add,update,delete,delete tables,db's ect..). This is just
    an approach that you could take.

    Hope this helps,


    paddlefoot

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    455
    Hello paddlefoot & bruiserbruce,

    Thanks for your information.

    Michelle.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width