Previous in Contents Next in Contents

SimpleDBDS Read/Write Path and Methods

The Directory Services path for read/write access is expressed in the format:

SimpleDBDS://RW/ConnectionString/Table/Key/Reserved/Marshalled Column/DateChanged/DateCreated/[KeyType]/KeyValue

where:

RW
Indicates read/write.
ConnectionString
A connection string for the data source, specified as a string Variant.
Table
The table within the data source in which to maintain the data.
Key
The column name that the DBStorage object uses as a key into the database table. This column should be marked to contain unique values.
Reserved
This parameter is reserved for future use. No value should be supplied.
MarshalColumn
Optional. A column that stores data for which no appropriate column exists in the data source table (see the following section, "Remarks").
DateChanged
Optional. The name of a key or attribute in the database into which to write the date on which the data is changed. (If you do not specify a column name that exists in the database, the change date will be included in the marshalled data.)
DateCreated
Optional. The name of a column in the database into which to write the date on which the record is created. SimpleDBDS adds a date stamp when it creates a new entry in the database. If you do not want to store this date, do not supply this argument. The / separator is not optional.
KeyType
Optional. The data type of the KeyValue. If not specified, the default is string. The / separator is not optional. Usually keys are strings or long integers, but any of the following types may be used:
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

KeyValue
Optional. The value for the ? in the SQL query. If the path does not include a ? in the SQL query, a Key Value should not be provided. The / separator is not optional.

Remarks

The ConnectionString¸ Table, Key, ProgID, MarshalColumn, and DateChanged parameters are identical to the corresponding parameters to the DBStorage.InitStorage method.

The Key parameter references a column in the table referenced by Table that the DBStorage object uses to key into the data source table. It is recommended that this column be configured at table creation to store only unique values.

The MarshalColumn parameter is used to store data that does not appropriately belong in any other column in the data source table. For example, should you specify my_column as the column in which you want to store data, and no such column exists, then the value that you specify for that column will be stored in the column that you specify as MarshalColumn.

Example

The following sample specifies a read/write ADSI provider that uses the connection string "DSN=cs; UID=sa;PWS=", and queries the Volcano Coffee shopper database, in which shopper_id is the key. By default, the KeyType is string:

SimpleDBDS://RW/DSN=cs;UID=sa;PWD=/vc30_shopper/shopper_id//////Q0H4SE915ASH2KC000Q79QB17E500439

When this path is used to create a SimpleDBDS object, the object's GetInfo method can be called to retrieve information from the vc30_shopper table, where the value in the shopper_id column matches the specified shopper ID.

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/write SimpleDBDS supports the following 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/write SimpleDBDS supports the following methods.

Method Description
Get Retrieves value for a named property from the object.
GetEx Same function as Get.
GetInfo Reloads the object with property values that exist in the database.
Put Sets the value for a named property of an object.
PutEx Sets the value for a named property of an object, or allows a property to be cleared.
SetInfo Writes object property values to the metabase.


© 1997-2000 Microsoft Corporation. All rights reserved.