Lotus notes email and SQL Server

  • Hi All,

    Is there a way to download lotus notes emails to SQL SERVER?., if so please help me.

     

    Thanks in advance.

  • Here is the advice from Lotus Notes developer:

    Use Notes designer to write code that is very similar to VB code. You can easily output any or all of the Notes email (and not only email but document databases as well) fields to the ASCII file and use DTS to import this file to SQL server

    Second way will be use ODBC connection right from Notes code, see "ODBC Connect" help topics in Notes. There is a couple of topics with examples if you search Help by "ODBC Connect" keywords.

    You will be able to run Notes scripts as jobs too.

    Yelena

    Regards,Yelena Varsha

  • Thanks Yelena, Do you have any examples for the first option, if so please post or send me to personal mail.

    With second option#, i have installes notesSQL and created ODBC but when i try to connect its hanging, any ideas?.

    Again thanks for your help on this.'

     

  • Hi,

    I will try to ask tomorrow, she already went home and I don't have notes Designer SW.

    Yelena

    Regards,Yelena Varsha

  • Hi RS,

    I talked to my friend the Notes developer and she told me that first, there is another way to connect to Notes database using ODBC, you will need to download a driver from IBM website and follow instructions. She did not do it herself but someone she knows did that from SQL Server- Based reporting tool Brio. Additionally she said that if you want write code in Notes to export data as a text file for later export to SQL Server it should be like that. This is just an idea, you need to know your database.

    you have to Dim variables for: NotesSession, NotesDatabase, NotesDocumentCollection, NotesDocument, NotesStream, Pathname. Then set session to the new NotesSession, set DB to what you need, set Document Collection to what you need. Suppose DC is your Document Collection

    Set doc = dc.GetFirstDocument

    Set stream = session.CreateStream

    pathname = "C:\Temp\MyPath"

    stream.Open(pathname, "ASCII")

    ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

    While Not ( doc Is Nothing )

    Call stream.WriteText(doc.GetItemValue("MyField1")(0) )

    Call stream.WriteText(doc.GetItemValue("MyField2")(0),(0))

    Set doc = dc.GetNextDocument(doc)

    Wend

    Call stream.Close

    Regards,Yelena Varsha

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

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