0 Then Msgbox doc.getitemvalue("Errore")(0) End If Call doc.RemovePermanently(True) --- L'agente "recupera" il documento attraverso la proprietà ParameterDocId della NotesAgent: Dim s as new notessession Dim db as notesdatabase Dim agent as notesagent Dim docEsito as notesdocument Set db = s.currentdatabase set agent = s.currentagent Set docEsito = db.GetDocumentById(agent.parameterdocid) ' in caso di errore Call docEsito.replaceitemvalue("Errore", "errore odbc...") Call docEsito.save(True, False) --- Questo ti permette ovviamente di gestire più info oltre un semplice errore...">
> |  
re : Info su ODBC
cyberflaz
I MsgBox li puoi usare in realtà ma chiaramente non viene restituito all\'utente bensì lo leggerai nella console di domino.

Se hai necessità di fornire all\'utente un messaggio a seguito dell\'agente puoi sfruttare il parametro noteid del metodo RunOnServer della classe NotesAgent.

Ovvero, operazione utente:

Set doc = db.createdocument
call doc.replaceitemvalue("Form", "esito_agente")
call doc.save(True, False, True)

Call agent.runonserver(doc.noteid)

\' una volta terminato l\'agente recuperi il documento

unid = doc.universalid
Delete doc
Set doc = db.getdocumentbyunid(unid)
If Len(doc.getitemvalue("Errore")(0)) > 0 Then
Msgbox doc.getitemvalue("Errore")(0)
End If
Call doc.RemovePermanently(True)

---

L\'agente "recupera" il documento attraverso la proprietà ParameterDocId della NotesAgent:

Dim s as new notessession
Dim db as notesdatabase
Dim agent as notesagent
Dim docEsito as notesdocument

Set db = s.currentdatabase
set agent = s.currentagent
Set docEsito = db.GetDocumentById(agent.parameterdocid)

\' in caso di errore

Call docEsito.replaceitemvalue("Errore", "errore odbc...")
Call docEsito.save(True, False)

---

Questo ti permette ovviamente di gestire più info oltre un semplice errore...

Massimo Nadalin | Devangarde


Info su ODBC - greghph -
    re : Info su ODBC - Giuseppe -
    You are here re : Info su ODBC - cyberflaz -
    re : Info su ODBC - greghph -
    re : Info su ODBC - greghph -
    re : Info su ODBC - greghph -
        re... : Info su ODBC - cyberflaz -
    re : Info su ODBC - greghph -
    re : Info su ODBC - cyberflaz -
    re : Info su ODBC - greghph -
        re... : Info su ODBC - cyberflaz -
    re : Info su ODBC - greghph -