Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Writing a comma into a structured attribute using setfieldvalue

3 views
Skip to first unread message

Jim Goodall

unread,
Dec 2, 2008, 9:42:07 AM12/2/08
to
Hi Folks,

I'm looking to write the following value to DirXML-Associations :

NDS:\\TEST\test\services\DriverSet3-5\SQL,
USERID=542,table=USERS,schema=DBO, 1

DirXML-Associations is a structured attribute comprising of Volume (which
holds the dn of the associated driver), Path (which holds the association
value) and Name Space (which holds the association status)

I have written and application for use in our test environment to remove
individual driver associations within a whole tree or portions there of.
This is achieved by reading the current associations into an array,
stripping out the removed association and writing the array back to the
object.

This all worked fine until we introduced an SQL driver. The SQL association
contains commas. This means when I execute the following code:

entry.SetFieldValue "dirxml-associations",
"NDS:\\TEST\test\services\DriverSet3-5\SQL,
USERID=542,table=USERS,schema=DBO, 1"

the commas within NDS:\\TEST\test\services\DriverSet3-5\SQL, USERID=542 get
treated as delimiters and I get a "Run-time error '13': Type Mismatch

Can anyone tell me how I can pass this without the commas being interpreted
as field delimiters?

Many Thanks

Jim


Wolfgang Schreiber

unread,
Dec 2, 2008, 9:04:02 PM12/2/08
to
Jim,

since the control uses the comma as delimiter in the structured attribute,
it probably is lost when trying to tell what element needs to go where.

The solution may be to set the individual structure fields explicitly - see
http://developer.novell.com/documentation/activex_ndap/ocx_ndap/ref/nwdir/nwpath_object.htm

Something like


Dim myAssociation as New NWPath

myAssociation.VolumeName = "NDS:\\TEST\test\services\DriverSet3-5\SQL"

myAssociation.Path = "USERID=542,table=USERS,schema=DBO"

myAssociation.NameSpaceType = 1

entry.SetFieldValue "dirxml-associations", myAssociation


Good luck

Wolfgang


Jim Goodall

unread,
Dec 4, 2008, 5:30:57 AM12/4/08
to
Brilliant!

Thanks Wolfgang!

Jim


"Wolfgang Schreiber" <do.not...@by.email> wrote in message
news:mOlZk.4729$wo4....@kovat.provo.novell.com...

0 new messages