GrantAccess()

Examples


The GrantAccess() function of the SQL Maintenance form is used to grant security access to SQL tables and stored procedures.

Syntax

GrantAccess(object_name, type, group_name, database)

Parameters

object_name – A string specifying the object to which access is being granted. Typically, this is a table physical name.

type – A boolean that indicates whether access is being granted to a table or to the auto-generated stored procedures for the table. The value false indicates access is being granted to the SQL table. The value true indicates access is being granted to the auto-generated stored procedures for the specified table.

group_name – A string specifying the SQL group to which access is being granted. Typically, this will be “DYNGRP”.

database – A string specifying the database that contains the table or auto-generated stored procedures for which access is being granted.

Return value

A boolean. The value true indicates that access was granted, while false indicates it was not.

Comments

When granting access to a new table, you will first grant access to the table, and then to the auto-generated stored procedures for the table.

If an error occurs while granting access, an error dialog will be displayed that lists the number of the SQL error that occurred.


Documentation Feedback