DAFTools Main Object
DAFTools main object is created with the command:
DAFTools = Server.CreateObject("dafinfo.dafinfo.1")
Methods and Properties
Information on current HTTP request
Creates a DB object
Retrieve all virtual IP addresses on the server
DAFTools Version
Creates DAFTools error object
Send an e-mail
Security Function
Creates a User object using the current user information.
Set User = DAFTools.CurrentUser
| Part | Description |
| Return Value | User object |
The current user is the user authenticated while receiving the HTTP request.
See also: User object
Creates a DB object using the current DAF database.
Set DB = DAFTools.CurrentDB
| Part | Description |
| Return Value | DB object |
The current DAF database, is the user list mapped to the IP address receiving the HTTP request.
See also: DB Object
Returns the IP address which received the current HTTP request.
CurrentIP = DAFTools.ServerIP
| Part | Description |
| Return Value | string value |
Creates a DB object using an index value.
Set DB = DAFTools.DB(Id)
| Part | Description |
| Id | 0 based index value |
| Return Value | DB object |
See also: DB Object
Creates a DB object using a DAF DB name.
Set DB = DAFTools.DBByName(DBName)
| Part | Description |
| DBName | Name of DAF Database |
| Return Value | DB object |
See also: DB Object
Returns an IP address attached to DAF database.
IP = DAFTools.IPByDB(DBName, Id)
| Part | Description |
| DBName | DAF Database name |
| Id | 0 based index value |
| Return Value | String value |
Creates a DB object using the DAF database mapped to an IP address.
Set DB = DAFTools.DBByIP(IP)
| Part | Description |
| IP | IP address ("X.Y.Z.W") defining the DAF DB object to create |
| Return Value | DB object |
See also: DB Object
Lists all virtual IP addresses found on the server.
IP = DAFTools.IP(Id)
| Part | Description |
| Id | 0 based index value |
| Return Value | string value |
Examples:
The following sample ASP script will display all virtual IP addresses found on the server.
DAFTools = Server.CreateObject("dafinfo.dafinfo.1")
.
.
.
i=0
do
sIP = DafTools.IP(i)
if sIP="" then
exit do
else
response.write "IP " & i & " : " & sIP & "<br>"
i=i+1
end if
loop
Returns the DAFTools version as a string value.
DAFVersion = DAFTools.Version
| Part | Description |
| Return Value | string value |
Returns the DAFTools Low version as an integer value.
DAFVersion = DAFTools.VersionLo
| Part | Description |
| Return Value | string value |
Returns the DAFTools Hi version as an integer value.
DAFVersion = DAFTools.VersionHi
| Part | Description |
| Return Value | string value |
Returns the DAFTools version as an integer value.
DAFVersion = DAFTools.Version2
| Part | Description |
| Return Value | integer value |
Creates an Error object which contains the last DAFTools error.
Set DAFError = DAFTools.Error
| Part | Description |
| Return Value | Error object |
See also: Error Object
Resets the last DAFTools error.
DAFTools.ClearError
| Part | Description |
| Return Value | None |
Sends an e-mail.
DAFVersion = DAFTools.SendMail(Host, ReturnPath, Subject, MailTo, Data)
| Part | Description |
| Host | mail server |
| ReturnPath | e-mail address for reply |
| Subject | Subject of message |
| MailTo | Recipient of message |
| Data | Text of the message |
| Return value | "OK" if success, or error string |
Login the main administrator.
Result = DAFTools.MainAdminLogin(AdminLogin, AdminPassword)
| Part | Description |
| AdminLogin | DAF Administrator login |
| AdminPassword | DAF Administrator password |
| Return Value | Boolean value |
The default DAF administrator is:
Only one DAF administrator can be defined, the login and password should be set with
method SetMainAdmin.
If default DAF administrator name was not changed, the current script owns DAF
Administrator rights.
To reset an existing DAF administrator, the following key in the registry should be
deleted:
[HKEY_LOCAL_MACHINE\SOFTWARE\daf\DAFTools\Admin]
Sets a new DAF administrator login and password.
Result = DAFTools.SetMainAdmin(oldLogin, oldPassword,newLogin,newPassword)
| Part | Description |
| oldLogin | old DAF Administrator login |
| oldPassword | old DAF Administrator password |
| newLogin | new DAF Administrator login |
| newPassword | new DAF Administrator password |
| Return Value | Boolean value |
The default DAF administrator is:
Example:
Result = DafTools.setmainadmin("admin","","newlogin","newpass")
Returns the current logged state of DAF administrator.
AdminLogged = DAFTools.IsMainAdminLogged
| Part | Description |
| return value | Boolean value: TRUE if administrator is logged |
| Return Value | Boolean value |
Log Off DAF administrator.
DAFTools.MainAdminLogOff
| Part | Description |
| Return Value | None |
Login a DAF security level.
Result = DAFTools.LevelLogin(DBName,Level,Password)
| Part | Description |
| DBName | DAF Database name |
| Level | Level to login |
| Password | Level password |
| Return Value | Boolean value |
Valid values for Level parameters are:
"Level1","Level2","Level3".
To reset a Level password, the following key in the registry should be deleted:
[HKEY_LOCAL_MACHINE\SOFTWARE\daf\Databases\<DB Name>\DAFTools\Access\<level>]
Returns the current logged state of a DAF security Level.
AdminLogged = DAFTools.IsLevelLogged(DBName)
| Part | Description |
| Return value | Integer value: - 0 if not logged - 1 for level1 - 2 for level2 - 3 for level3 |
Log Off the DAF administrator.
DAFTools.LevelLogOff
| Part | Description |
| Return Value | None |
Set a DAF security level password.
Result = DAFTools.SetLevelPassword(DBName,Level,oldPassword,newPassword)
| Part | Description |
| DBName | DAF database name |
| Level | Level for the new password |
| oldPassword | Old level password |
| newPassword | New level password |
| Return Value | Boolean value |