Novell is now a part of Micro Focus

I am having the hardest time trying to...

Articles and Tips: qna

01 Apr 2003


Q.

I am having the hardest time trying to come up with a way to edit a user's login script with Visual Basic's ActiveX controls. Can you point me in the right direction?

A.

Have you looked at the NWDir Control? With it you can use the LoadFieldValueFromFile and SaveFieldValueToFile function to write to and read from an NWStream object.The help file even has an example of this problem:

Use this method together with the LoadFieldValue- FromFile method to read and write fields of type NWStream. These methods can be used only for fields of type NWStream; to read and write fields of other types, use the GetFieldValue method and SetFieldValue method.

Fields of type NWStream are useful for storing large binary blobs of data (such as multimedia data) into the directory. Once saved to a temporary file, the data can be accessed using standard file access methods.

This Visual Basic example reads from an entry and saves to a file.

Dim Entry As NWEntry
Set Entry = NWDir1.Entries("Bob")
Entry.SaveFieldValueToFile "Login Script", "logscrpt.txt"

* Originally published in Novell AppNotes


Disclaimer

The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Copyright Micro Focus or one of its affiliates