Convert VB Code to Sql

  • The Followint is VB Code that Run Ok.

    Now,I Want to Change it to Store Prcedure.

    -- Const Notes_Servername = "www.thenorth.com/thenorth"

    -- Const Notes_MailDatabaseFile = "mail/ajpmail.nsf"

    -- Const mailRecipient = "andrewp@thenorth.com"

    -- Const mailsubject = "this is the subject of the memo"

    -- Const mailbody = "this is the text I want to send"

    --

    --

    -- Dim notessessionobject As Object

    -- Dim notesdb As Object

    -- Dim notesdoc As Object

    --

    -- Set notessessionobject = CreateObject("notes.notessession")

    -- Set notesdb = notessessionobject.getdatabase(Notes_Servername, Notes_MailDatabaseFile)

    --

    -- If Not notesdb.isopen Then

    -- MsgBox ("No Notes Database Found!")

    -- Exit Sub

    -- End If

    --

    -- Set notesdoc = notesdb.createdocument()

    --

    -- With notesdoc

    -- .Form = "Memo" 'A notes document needs a form name

    -- .sendto = mailRecipient

    -- .subject = mailsubject

    -- .body = mailbody

    -- End With

    --

    -- Call notesdoc.send(False)

    Thanks!

  • Look at:

    xp_sendmail

    in the online books - it should explain all the parameter values well enough for your emails. Simply create a VB connection and statement object and pass in the params.

    I assume that's what your question was, and not "how do I write a stored procedure".

  • Just found this via the next post ...code is ASP, so you should be able to use alot of it as is.

    http://www.nigelrivett.net/DBAccess.inc.html

    Thanks to Nigel for sharing the scripts.

    Jeff

  • thank jmadsen!

    thank jmadsen!

    I think My Topic Is Interesting.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply