PortSight Secure Access Documentation

KB-SA-0016-How to find a list of users from either the user's first name, middle name or last name

 

Date:

September 1, 2004

 

Applies to:

Secure Access 2.1 and any later version

 

Summary:

Could you tell me if you have sample of code for SecureAccess (2.3), to find a list of users from either the user's first name, middle name or last name?

 

Solution:

There are no direct functions for getting list of users however you can use DB layer. Here is a sample showing how to get relationship types:

 

Imports Portsight.SecureAccess.ARDataServices

Imports Portsight.SecureAccess.ARDataServices.ARConstants

....

Dim ARDBConn As ARDBConnection = New ARDBConnection()

ARDBConn.ConnectToCatalog()

ARDBConn.Table = "View_AR_RelationshipType"

Dim Params(0, 1) As String

Params(0, 0) = ARConstants.cRELATIONSHIP_TYPE_NAMESPACE

Params(0, 1) = "MyApplication.MyAppPart"

ARDBConn.Parameters = Params

ds = ARDBConn.SelectRecords

 

Getting the users will be similar but you will use different SQL View and different filter parameters. For more samples please see UserList.aspx and ARUIUserList.ascx pages. Regarding the parameters, they are specified as pairs column/value and there can be unlimited number of these pairs. The values can be prefixed with ?lt;##LIKE##>?that will cause listing all the rows whose specified column contains the provided substring, e.g.

Params(0, 1) = "<##LIKE##> MyApplication.MyAppPart"