2.7 Inserting, Updating or Deleting Entries from the eDirectory Data Source

You can update the NDS Data Source using simple insert, update, and delete SQL queries.

Insert

The following SQL statement enables you to add an user object to the NDS Data Source:

 INSERT into UserNDS (Surname, Nds_Name, UID) values (’Duke’, ’Luke’, 8)
 

Update

The following SQL statement enables you to modify an user object in the NDS Data Source:

 UPDATE UserNDS SET Surname = ’Kuke’, UID = UID + 20 WHERE Nds_Name LIKE ’%uke’
 

The following SQL escape syntax enables you to modify the timestamp:

 UPDATE UserNDS SET "password expiration time" = {ts '2004-02-02 08:00:00.00'} WHERE Nds_Name = 'user'"
 

Delete

The following SQL statement enables you to delete an user object from the NDS Data Source:

 DELETE FROM UserNDS WHERE Nds_Name = ’Luke’ OR UID > 7
 

NOTE:While inserting an object, you need to specify the Nds_Name as an attribute (column in SQL).

The driver does not support positioned update, delete, or insertion.

If the attribute value is in decimals it will be treated as an Integer while adding to Novell eDirectory.

You cannot create or drop a table (create or delete an object class, which requires schema extension) using the ODBC driver.

For a single entry, SQL semantics does not permit using multiple values for a single column. Hence, this driver does not allow you to Insert/Update an entry with multiple values for one particular attribute. However, the driver allows you to put in just one value for a multi-valued attribute.