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
Solved

Integrating Outlook2000 with either Access or MSSQL

Posted on 2000-02-24
3
204 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
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
imap sent folders sychronization 2 44
Exchange 2010 Mailbox 6 35
exchange, calendar, outlook 1 30
Search not working in Outlook 2016 7 326
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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