WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

dsSetProperty Error 246 Custom Attribute


Question:

I have been working with the dsSetProperty and I keep getting error 246 when trying to set attributes in ldap. I have created custom attributes and need to write the value. Here is my line.
edirSSNattr = "CustomQ" ; edirectory SSN attribute
dsSetProperty(lpath, edirSSNattr, ssn)
If I run the app against a different attribute such as description, it will write just fine. I know the type is fine for the attribute because I am able to enter it manually into the directory. Plus, I am able to ldap browse it just fine.

Is there a way to write to this attribute?

Answer:

Sometime this error occurs when you do not specify your credentials correctly. But since you have created your own property, I suspect that this is not the issue. The extender knows a great deal about property types but does not about them all. It is very picky about making sure that the it can handle the data correctly. If you created you custom property and did not do it exactly right or used a data type that the extender can not handle, the extender will throw this error.

There is also a possibility that you created your property with a data type that the extender handles for known AD properties but does not know how to handle for user added properties. There are not many of these but it can happen.

Whatever the cause I would recommend using WB's OLE functionality to access your property. You can mix OLE and extender use in the same script without to much difficulty. In this case use the .Get, .GetEx, .Put, and .PutEx methods to access and set your property.


Article ID:   W16310
File Created: 2005:02:18:12:19:44
Last Updated: 2005:02:18:12:19:44