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

Create Object - VB

23 views
Skip to first unread message

Brendan Watkins

unread,
Jan 30, 2004, 10:18:33 AM1/30/04
to
Hi,

Can anyone help with me this problem, or at least point me in the right
direction as to where to post it?

------------------------------------------------------------------------
I am trying to create a user object in NDS using VB 6.0. When I get to
the NWDSAddObject function, it returns a code, "-604" which I believe
correlates to a "No such class" error.

The code is below, I would really appreciate any help.

Thanks

Brendan

retCode = NWDSCreateContextHandle(context)

anyName = DS_ROOT_NAME + Chr(0)

Call StringToByteArray(anyName, byteName)

retCode = NWDSSetContext(context, DCK_NAME_CONTEXT, VarPtr(byteName
(0)))

anyName = Text1.Text + Chr(0)

Call StringToByteArray(anyName, byteName)

retCode = NWDSSetContext(context, DCK_TREE_NAME, VarPtr(byteName(0)))

retCode = NWDSAllocBuf(DEFAULT_MESSAGE_LEN, inBuf)

retCode = NWDSInitBuf(context, DSV_ADD_ENTRY, inBuf)

retCode = NWDSPutAttrName(context, inBuf, "Object Class")

retCode = NWDSPutAttrVal(context, inBuf, SYN_CLASS_NAME, "User")

retCode = NWDSPutAttrName(context, inBuf, "Surname")

retCode = NWDSPutAttrVal(context, inBuf, SYN_CI_STRING,
"WatkinsTest")

retCode = NWDSPutAttrName(context, inBuf, "Given Name")

retCode = NWDSPutAttrVal(context, inBuf, SYN_CI_STRING, "Brendan")

retCode = NWDSAddObject(context, "bwatki02.imss.mtsinai.north.uoc", -
1,
0, inBuf)

MsgBox retCode


AndersG

unread,
Jan 30, 2004, 3:22:43 PM1/30/04
to
Brendan Watkins,

> direction as to where to post it?
>
The developer forums. Developer.novell.com

- Anders Gustafsson, Engineer, CNE6, ASE
NSC Volunteer Sysop (http://support-forums.novell.com)
Pedago, The Aaland Islands (N60 E20)
Using VA 4.52 build 277 (32-bit) on Windows 2000 build 2195

AndersG

unread,
Jan 30, 2004, 3:30:09 PM1/30/04
to
Brendan Watkins,

> Can anyone help with me this problem, or at least point me in the right
> direction as to where to post it?
>
Developer forums. Developer.novell.com

Peter Kuo

unread,
Jan 31, 2004, 10:57:34 PM1/31/04
to
Brendan,

> retCode = NWDSAddObject(context, "bwatki02.imss.mtsinai.north.uoc", -
> 1,
> 0, inBuf)
>

Two things:

a) Why use "1" here and not a 32-bit integer variable init. to -1?
b) Depending on your context, the "bwatki02.imss.mtsinai.north.uoc" may need to be ".bwatki02.imss.mtsinai.north.uoc" instead

For more info, please post to http://developer-forums.novell.com


Peter
Novell Product Support Forum
'NDS Rules!'


Brendan Watkins

unread,
Feb 2, 2004, 11:16:06 AM2/2/04
to
Peter,

Thank you very much for getting back to me. I have posted to
developer forum.

I had used -1 and not 1, and I tried to use your second suggestion,
but it didn't help.

I'll await a response from novell.devsup.general.

Thanks again and thanks Anders!

Brendan

Peter Kuo <Pe...@Novell.Support.Connection> wrote in message news:<VA.00000350.37893d28@aopen3ghza>...

Marcel Cox

unread,
Feb 4, 2004, 1:27:24 PM2/4/04
to
Brendan,

Your message was not posted to the official Novell news
server. While your news server might show the Novell support
newsgroups, Novell has no official connection with other news
servers, and the message you posted will probably never
propagate to the official Novell server. The SysOps only see
messages on the Novell server and for that reason,
you will probably never get a reply to your
message posted here.

I suggest you post your message directly to the official
novell news server named support-forums.novell.com. The
Novell news server is freely accessible both through HTTP
and NNTP. See http://support.novell.com/forums for details.

This message was posted automatically. Please do not reply
to it.

Marcel Cox
Novell Support Forums SysOp


Brendan Watkins

unread,
Feb 6, 2004, 11:42:43 AM2/6/04
to
For anyone interested, I actually got a good response from Karl
Durrance who pointed me towards his excellent clsNovellAPI.

http://forge.novell.com/modules/xfmod/project/?vb6-api-class

So, I am now able to create user accounts etc.


Marcel Cox <cim...@digitalme.com> wrote in message news:<4021398c$1...@news.vo.lu>...

Marcel Cox

unread,
Feb 6, 2004, 1:39:30 PM2/6/04
to
0 new messages