Solved

Integrating Outlook2000 with either Access or MSSQL

Posted on 2000-02-24
3
207 Views
Last Modified: 2010-04-08
I am trying to integrate Outlook2000 with both Access and Microsoft SQL Server.
I know it can be done ith ADO, but all the stuff I can find at Microsoft and other places, seem to assume a level of understanding that I just do NOT have.
If anyone can help me here with either samples or working code fragments, it would be really helpful.
0
Comment
Question by:Matlock
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Expert Comment

by:Neo_mvps
ID: 2556418
I'm not sure if this will help or hinder you, but give http://www.slipstick.com/dev/database.htm a peek.
0
 
LVL 6

Accepted Solution

by:
Jon_Raymond earned 100 total points
ID: 2556590
What level do you have?  You have to know a minimum of programming fundamentals, like referencing the outlook object from VB or referencing Access from outlook (which one are you trying to do?).  You have to know how to make a connection either way.  This is basically simple.  You dim the ADO connection and recordset objects then go to work:


    Dim iRow As Integer
    Dim iCol As Integer
    Dim rs As ADODB.Recordset
    Dim conn As ADODB.Connection
    Dim strCnn As String
    ' Open a connection using a DSN and ODBC tags.
    Set conn = New ADODB.Connection
    'conn.ConnectionString = "DSN=SLXDSN;UID=sysdba;pw=masterkey"
    conn.Open "DSN=SLXDSN"
    strCnn = "Provider=sqloledb;server = JONRWIN98;" _
        & "uid=sa;pwd=;database=pubs"
    If conn Is Nothing Then
        Set conn = New ADODB.Connection
    End If
    Set rs = New ADODB.Recordset
    rs.Open "dbo.spTestIndex_Employee", strCnn, adOpenDynamic, adLockPessimistic
    ' use Getrows to put the recordset into an array:
    vCurrentArray = rs.GetRows(10, iRecordNumber)
    ' if you don't use getrows you can do this with a recordset
    ' from a stored procedure that limits the rows returned
    'with the same parameters that getrows uses:
   
    'Do While Not rs.EOF
    '    For iCol = 0 To 2
    '       vCurrentArray(iCol, iRow) = rs(iCol)
    '    Next                'iCol
    '    rs.MoveNext'
    'Loop
   
    'or loop through the recordset itself:
    With rs
        Do While Not .EOF
            'do some thing here with each record:
            vVariable1 = rs(0) ' the first field by number or
            vVariable2 = rs("Field 2") ' the second field by its name in quotes
        Loop
    End With
   
   
For samples of how to manipulate Outlook objects see:
http://www.microsoft.com/outlookdev/articles/outprog.htm

If this is too complicated then coding isn't for you.
0
 

Author Comment

by:Matlock
ID: 2565102
Thanks to both Neo_mvps
 and Jon Raymond, both bits were helpful but I have Accepted Jon's comment as the answer as I have been able to modify his code to make my application ( A VBScript behind an Outlook form to read from SQL7)

Coding isn't the problem, but moving from C/C++ to VB can be ....
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question