This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jul 29, 2016, 9:33 AM
2 Posts

Upload id to ID Vault DB

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0
  • Role: Developer
  • Tags:
  • Replies: 1

Hi 

I use this piece of script to auto upload an id to ID Vault.
But the SECidfPut function allways return an error (20111) of which the getAPIError does not return the error string.
Does someone knows what is missing in my code to upload the id correctly to ID Vault DB?

PortName = "" 
fileNum% = FreeFile()
ServerName = VaultDB.Server 
FileName = VaultDB.FilePath 
ret = PathNetIDVConstruct(PortName, ServerName, FileName, pathName) 
ret = NSFIVDbOpen(pathName, hdb) 

Password = idpassword
Username = SearchName
ret = SECidfPut(Username,Password,CStr(IDFilename),0,ServerName,0,0,0)
Print "Error message: " + getAPIError (CInt(ret))

Aug 9, 2016, 6:14 AM
6 Posts
IBM provided button to upload id to vault

you can try this:

 

Sub Click(Source As Button)
    On Error Goto err1
    Dim ws As New NotesUIWorkspace
    Dim Servername As String
    Dim hKFC As Long
    Dim session As New NotesSession
    Dim user As String
    Dim path As String
    
    path = session.GetEnvironmentString("KeyFileName",True)
    
    user = session.UserName
    
    Servername = "type the vault server name here"
    
    IDfilename = path
    
pwd:    
    Password = ws.Prompt(PROMPT_PASSWORD, "ID-Management - Password prompt", "Please enter the Notes ID password.","")
    
    ret = SECKFMOpen(hKFC, IDfilename, Password, SECKFM_open_All, 0, 0)
    
    If ret <> 0 Then Error 1212, "Error encountered - Please retry"
    
    ret = SECidfPut(user,Password,IDFilename,0,Cstr(Servername),0,0,0)
    
    If ret <> 0 Then Error 1212, "Error encountered - Please retry"
    
' Close the database to free its resources
    
    ret = NSFDbClose(hdb)
    
    ret = SECKFMClose(hKFC,SECKFM_close_WriteIdFile,0,0)
    
    If ret <> 0 Then Error 1212, "Error encountered - Please retry"
    Msgbox "ID Upload successful"
    Exit Sub
err1:
    Print Error & "-" & Erl
    Goto pwd
End Sub


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal