The Directory Services path for read-only access is expressed in the format:
SimpleDBDS://RO/ConnectionString/SQL Statement/[KeyType]/[KeyValue]
where:
KeyType specifier | Data type of KeyValue specifier |
---|---|
string | String (default) |
long | 32-bit long integer |
integer | 16-bit integer |
single | Single-precision floating-point number |
double | Double-precision floating-point number |
currency | Currency |
date | Date |
The following example creates a read-only ADSI provider that uses the connection string "DSN=cs; UID=sa;PWD=
", and queries the Clocktower product database using a given SKU (Lor-842W) as a query argument. The example uses the property of the ADSI provider object to display values in a page:
<%
Set CurrentNode = GetObject("SimpleDBDS://RO/DSN=cs;UID=sa;PWD=/select sku, name, dept_name from clocktower_product, clocktower_dept where clocktower_product.dept_id = clocktower_dept.dept_id and sku = ?//Lor-842W")
Response.Write("<br>Name: ")
Response.Write(CurrentNode.Name)
Response.Write("<br>ADsPath: ")
Response.Write(CurrentNode.ADsPath)
Response.Write("<br>Parent: ")
Response.Write(CurrentNode.Parent)
Response.Write("<br>sku: ")
Response.Write(CurrentNode.Get("sku"))
Response.Write("<br>name: ")
Response.Write(CurrentNode.Get("name"))
Response.Write("<br>dept_name: ")
Response.Write(CurrentNode.Get("dept_name"))
%>
The previous script produces the following output:
Name: RO/DSN=cs;UID=sa;PWD=/select sku, name, dept_name from clockped_product, clockped_dept where clockped_product.dept_id = clockped_dept.dept_id and sku = ?//Lor-842W
ADsPath: SimpleDBDS://RO/DSN=cs;UID=sa;PWD=/select sku, name, dept_name from clockped_product, clockped_dept where clockped_product.dept_id = clockped_dept.dept_id and sku = ?//Lor-842W
Parent: SimpleDBDS:
sku: Lor-842W
name: Primrose Wall Clock
dept_name: Wall Clocks
Note The methods of the SimpleDBDS object are not usually used directly by ASP in a Commerce Server site. Instead, the AUO is configured to use SimpleDBDS as an ADSI provider, and the AUO is used to access customer information.
The read-only SimpleDBDS supports the following ADSI properties.
Property | Description |
---|---|
Name | Portion of the path following "SimpleDBDS://". |
ADsPath | ADSI path. |
Parent | Name of the ADSI provider, in this case SimpleDBDS. |
The read-only SimpleDBDS supports the following methods.
Method | Description |
---|---|
GetInfo | Reloads the object with property values that exist in the metabase. |
Get | Retrieves value for a named property from the object. |
GetEx | Retrieves value(s) for a named single-valued or multi-valued property of the object. |