Q

Using VB script on a Web server and submitting online forms to a Lotus database

Is it possible to use VBscript on a Web server and submit online forms to a Lotus database? If yes, how do I refer to or point to the database from VB script?
Yes, you could do it in at least two ways that I can think of. If you have a Domino server running HTTP, you could simply make the ACTION attribute of the
tag point to a form or agent in the database that will process the data. Alternatively, you could write an ASP page that uses COM to access the Domino objects to add the form content to a database. Keep in mind that COM only supports the back-end classes for Domino. I have added a simple example below, which is code I put in the click event of a button on a VB form.

Private Sub Command1_Click()
' Last mods 020518 - dhatter@libertastechnologies.com -
www.libertastechnologies.com
Set nsCurrent = CreateObject("Lotus.NotesSession")
Dim ndbTarget As NotesDatabase
Dim ndocTarget As NotesDocument
Dim arrRecipients(3) As String
arrRecipients(0) = "John Galt"
arrRecipients(1) = "Hank Rearden"
arrRecipients(2) = "Dagny Taggart"
arrRecipients(3) = "Sebastian D'Aconio"
Call nsCurrent.Initialize
Set ndbTarget = nsCurrent.GetDatabase("", "C:program
fileslotusnotesdatadhatter.nsf")
Set ndocTarget = ndbTarget.CreateDocument
Stop
With ndocTarget
Call .ReplaceItemValue("Form", "Memo")
Call .ReplaceItemValue("Subject", Subject.Text)
Call .ReplaceItemValue("Body", Body.Text)
Call .Save(True, False)
Call .Send(False, arrRecipients)
End With
MsgBox "COM example completed successfully",
64, "www.libertastechnologies.com"
End Sub
This was first published in May 2002

Dig deeper on Domino Resources - Part 4

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close