This method creates an Access database and populates it with the necessary tables to host a Membership LDAP directory service.
IDL Definition
HRESULT CreateJetDB(
[in] BSTR bstrFileName,
[in] BSTR bstrDirectoryName,
[in] BSTR bstrDBUserName,
[in] BSTR bstrDBPassword,
[in] BSTR bstrSuperDSPassword,
[in] BOOLEAN fUseMemSecurity
);
Parameters
bstrFileName
the filesystem path to the access database. All relative paths are from the c:\winnt\system32 directory.
bstrDirectoryName
the top level name of the directory. (.eg. "MyCompany" names the directory and the distinguished name becomes "o=MyCompany" in the directory.)
bstrDBUserName
not used currently.
bstrDBPassword
not used currently.
bstrSuperDSPassword
the password to set for the Directory administrator. This password must be set up in a special manner. The username in the directory service is always "administrator".
fUseMemSecurity
a flag specifying whether the LDAP service using this database as a backend will provide user authentication services to a Membership virtual server. 0=false, 1=True
Return Value
a standard HRESULT value
Example
Set ObjCreator = CreateObject("ObjCreator.ObjCreator.1")
Set DSConfig = ObjCreator.CreateObjAuth("MemAdmin.DSConfig.1")
Filename="inetsvr\myldapdb.mdb"
DirName="company1"
DBUserName=""
DBUserPass=" "
DBSuperPass="superpass"
fUseMembershipSecurity=1 ' true
call DSConfig.CreateJetDB(Filename, DirName, DBUserName, DBUserPass, DBSuperPass, fUseMembershipSecurity)
If Err.Number <> 0 Then
WScript.Echo "Error creating access database: " & Err.Description
End If