PDA

View Full Version : یک سوال در مورد user ها در ACCESS



Delphi Skyline
پنج شنبه 06 اسفند 1383, 21:40 عصر
با سلام.
چه طوری در یک بانک access یک user جدید درست کنم.
به طور پیش فرض من فقط admin دارم .
لطفا کمک کنید.....
بای...

payam59
شنبه 08 اسفند 1383, 10:28 صبح
tools>Security>User and Group &Accounts :موفق:

Delphi Skyline
شنبه 08 اسفند 1383, 16:30 عصر
متشکرم.
تو زبان دلفی چه طوریه؟

hrh
دوشنبه 10 اسفند 1383, 09:03 صبح
آیا با DAO کار کردی؟

Delphi Skyline
دوشنبه 10 اسفند 1383, 17:07 عصر
نه . می شه کامل برام توضیح بدید.
من از ADO استفاده می خوام بکنم..

Delphi Skyline
یک شنبه 16 اسفند 1383, 21:26 عصر
hrh جان فکر کنم منظور شما هم ADO بوده است.

hrh
یک شنبه 23 اسفند 1383, 09:01 صبح
نه عزیز منظورم همان DAO‌ است


CreateUser Method and Password and PID Properties Example

This example uses the CreateUser method and Password and PID properties to create a new User object; it then makes the new User object a member of different Group objects and lists its properties and groups.

Sub CreateUserX(ByRef strPassword As String)

Dim wrkDefault As Workspace
Dim usrNew As User
Dim grpNew As Group
Dim usrTemp As User
Dim prpLoop As Property
Dim grpLoop As Group

Set wrkDefault = DBEngine.Workspaces(0)

With wrkDefault

' Create and append new User.
Set usrNew = .CreateUser("NewUser")
usrNew.PID = "AAA123456789"
usrNew.Password = strPassword
.Users.Append usrNew

' Create and append new Group.
Set grpNew = .CreateGroup("NewGroup", _
"AAA123456789")
.Groups.Append grpNew

' Make the user "NewUser" a member of the
' group "NewGroup" by creating and adding the
' appropriate User object to the group's Users
' collection.
Set usrTemp = _
.Groups("NewGroup").CreateUser("NewUser")
.Groups("NewGroup").Users.Append usrTemp

Debug.Print "Properties of " & usrNew.Name

' Enumerate the Properties collection of NewUser. The
' PID property is not readable.
For Each prpLoop In usrNew.Properties
On Error Resume Next
If prpLoop <> "" Then Debug.Print " " & _
prpLoop.Name & " = " & prpLoop
On Error GoTo 0
Next prpLoop

Debug.Print "Groups collection of " & usrNew.Name

' Enumerate the Groups collection of NewUser.
For Each grpLoop In usrNew.Groups
Debug.Print " " & _
grpLoop.Name
Next grpLoop

' Delete the new User and Group objects because this
' is a demonstration.
.Users.Delete "NewUser"
.Groups.Delete "NewGroup"

End With

End Sub