473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

code to add user to workgroup

10
how to create a user from a form ???
i looked in help and i find something like this :
CREATE USER user password pid [, user password pid, …]
but i don't get it
how do the corect CREATE USER declaration looks ?

can you help mi with that problem ?
Feb 17 '07 #1
8 5092
ADezii
8,834 Expert 8TB
how to create a user from a form ???
i looked in help and i find something like this :
CREATE USER user password pid [, user password pid, …]
but i don't get it
how do the corect CREATE USER declaration looks ?

can you help mi with that problem ?
To create a New User named John Doe with no Password, and to make him a member of the Admins Group:
Expand|Select|Wrap|Line Numbers
  1. Dim MyWks As Workspace, MyUser As User
  2. Set MyWks = DBEngine.Workspaces(0)
  3.  
  4. With MyWks
  5.   'Create and Append the New User John Doe
  6.   Set MyUser = .CreateUser("John Doe")
  7.     MyUser.PID = "B6TFRE45"     'Unique Identifier
  8.     MyUser.Password = ""        'No Password
  9.     .Users.Append MyUser
  10.   'Make the User John Doe a member of the Admins Group by creating
  11.   'and adding the User Object to the Admin's Group Users collection
  12.   Set MyUser = .Groups("Admins").CreateUser("John Doe")
  13.   .Groups("Admins").Users.Append MyUser
  14. End With
Feb 17 '07 #2
gluchu
10
its working but when i try to login i get a message:
Record(s) cannot be read; no read permission on "MySysAccessObjects"
?????
Feb 18 '07 #3
ADezii
8,834 Expert 8TB
its working but when i try to login i get a message:
Record(s) cannot be read; no read permission on "MySysAccessObjects"
?????
I'm not really sure why you are getting this Error Message - perhaps it has something to do with restrictions applied to the Admins Group. I'll investigate further.
Feb 19 '07 #4
gluchu
10
i add user to the new created group not to the admins group
Feb 19 '07 #5
gluchu
10
i dont have permission to the system tables in security.mdw
only the enginer have it
Feb 19 '07 #6
gluchu
10
now i know why it dont works
i had to add every created user to the users group
Thnak's for your help ADezii
Feb 19 '07 #7
gluchu
10
i need one more thing
something in VB to change users password and to log out a user ?
Feb 19 '07 #8
ADezii
8,834 Expert 8TB
i need one more thing
something in VB to change users password and to log out a user ?
Not VB but SQL:
Expand|Select|Wrap|Line Numbers
  1. ALTER USER <UserName> PASSWORD <NewPassword> <OldPassword>
Feb 20 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: The Directive | last post by:
How do you make your code bulletproof? For example, I make my function bulletproof by validating every argument passed to the function. I ensure the arguments are within the expected ranges. This...
0
by: aj | last post by:
DB2 WSE LUW 8.1 Fixpak 5 Red Hat AS 2.1 I'm trying to set up a federated view from one DB2 database to another in the same instance on the same server. I do a: create server <SERVER> type...
7
by: Paul T. Rong | last post by:
A card where I wrote my name and WID (work group ID) was stolen (unfortunately together with other things), therotically the one who have my name and WID can create the same mdw file which I use...
6
by: Earl Teigrob | last post by:
I am writing an application that dynamically loads user controls at run time based on user options. I would like to give my users the ability to build their own user controls and add them to my...
6
by: Peri | last post by:
Dear All, Can anyone help me out to write event driven code in ASP.NET. That is 1. How do I get a Keypress event in a text box (or a control). 2. How do I get a Lostfocus event in a text box...
2
by: Jennifer | last post by:
I've created this ASP page with VB as the code behind. As part of the security there will only be a few people who should have access to the page. I was planning on a log-in screen, and then...
29
by: Paul H | last post by:
Why the heck was this dropped? All my dbs use ULS even the complex ones. It aint perfect, it's too fiddly, but it works. How will I be able to say "These users can run these reports and these...
1
by: dominosrob | last post by:
Hi all! I want to be able to use loginviews to display different content based on who is logged in. I am using a remote system to handle user logins and it will send back a token and a "yes" or...
2
by: Carin Botha | last post by:
I want to create a Stored Procedure or a view and ask for user input. Example: Select name from partner where code = 'User Input'. Could you help please?
2
by: ivytony | last post by:
First of all, I'm not sure if I've set up root password for MySQL server or not. I was following this tutorial http://www.howtoforge.com/centos-5.1-server-lamp-email-dns-ftp-ispconfig-p4 to install...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.