Connecting To An Lotus Database through ODBC

Discussion in 'OT Technology' started by CyberBullets, May 4, 2004.

  1. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    Can anyone verify that these steps are correct? Im doing this all by what I have researched.
    I'm needed to do this as Im getting involved on a project (just starting) that has to parse old Lotus 6.0 database files (nsf) and I have to deal with this research before I even touch the project.

    Any comments would be grealy appreciated :big grin: :wiggle:

    Here are my notes:

    Here are the notes you asked for referring to the lotus files, I have included links where needed.



    1) Setup Lotus SQL:
    First LotusSQL has to be installed, can be found on IBM's website
    (http://www14.software.ibm.com/webap...6+04:05:51.526065R&S_TACT=104AH W42&S_CMP=&s=)

    2) Configuring The Database Connection
    For this part, a valid *.id file is needed. An id file is the user file, and this will be associated to the *.nsf database. Once Lotus SQL is installed, run their NotesSQL Authentication List Manager (C:\NotesSQL\Nsql_ALM.exe) and select the database you want to use (top part), and the id you wish to associate with it (bottom half).
    (http://www.builderau.com.au/architect/database/0,39024547,20282240,00.htm)

    3) Configuring the ODBC & DSN
    Open up ODBC and add a new DSN. Select "Lotus NotesSQL Driver (*.nsf)". Put in a name + description, the domino server (where the server is located, localhost/etc) and the the database file.
    Click Options and add the user file (*.id) and put the password in
    (http://www.builderau.com.au/architect/database/0,39024547,20282240,00.htm)

    4) ASP Connection
    Here is the commands to connect to the server
    Code:
    <%
    
       Dim DSNName
       Dim DBUserName
       Dim DBPassword
       Dim dbConn
       Dim results
       Dim SQLStatement
    
       ' Database connection sub
       sub db_connect
    
           ' Create a connection object
           set dbConn = server.createobject("ADODB.connection")
           ' Open a connection using the following criteria - DSN Name, UserName, Password
           dbConn.open DSNName, DBUserName, DBPassword
    
       end sub
    
       ' Database disconnect sub
       sub db_disconnect
           dbConn.close
       end sub
    
       ' DSN Connection info
       DSNName="databasename" ' DSN Name
       DBUserName="user" ' Notes User Name
       DBPassword="pass" ' Notes Password
    
       ' Create the SQL to return any matches if the uppercased version of the username
       ' and the actual password are found in the View called myNewView
       SQLStatement="SELECT * FROM myNewView;"
    
       ' connect to the DB
       db_connect
    
       ' run the Query
       set results=dbConn.execute(SQLStatement)
    
       ' If the results set is empty
       if (results.EOF) then
           response.write("No Match")
       else
           response.write("Match")
       end if
    
       ' Close the results set
       results.close
    
       ' Disconnect from the Datasource
       db_disconnect
    %>
    
    (http://www.zdnet.com.au/builder/resources/notessql.html)
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
  3. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    looks fine to me :dunno:

    it works right?
     
  4. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    i just got the ID file and am now getting an error im trying to fix

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
    /index.asp, line 16
     
  5. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    hmmm a quick google search found that more people are using OLE DB rather than ODBC for that type of connection.
     
  6. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yeah i saw that too.

    :wtc: all i wanna do is connect to a nsf file! :wtc:
     
  7. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    [rant]

    well fuck me!

    god damn odbc doesnt work for some fucked up reason. no error is even given. i cant even test the connection!!

    i cant get lotus notes to run on xp, it isnt supported. what el fucko?!?! god damn it! fucking ibm!

    all i need to do is convert the 1.2gb file to mssql!!!
    [/rant]

    well time to install vmware and do a 2000 installl.... :hs:

    feel a little better
     
  8. Zourn

    Zourn 16-bit Ninja OT Supporter

    Joined:
    Apr 3, 2002
    Messages:
    2,354
    Likes Received:
    0
    Location:
    Texas
    It's always nice to have a spare quadruple boot laptop handy for cases like this. (Win98, Win2000, WinXP, Linux[pick your own flavor]):wiggle:
     
  9. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    i know, but right now im a poor as fuck student who blows all his money on alcohol. :)

    oh well
     
  10. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    GOT IT!

    Had to install (and find) Lotus Notes 7, configure that.
    Reboot
    Then had to force open the database, tell it to ignore any protection
    Add my user name to it
    Re-create my notessql connection
    Re-create my odbc connection
    Then DTS worked.

    It already died once cause i tired to get all tables and views to import at once... well with a 1.239GB file it can cause some problems, so I'm doing it in steps.
     
  11. Zourn

    Zourn 16-bit Ninja OT Supporter

    Joined:
    Apr 3, 2002
    Messages:
    2,354
    Likes Received:
    0
    Location:
    Texas
    I'm glad for you.
     
  12. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    DTS rocks! :)
     

Share This Page