Solved

connecting to outlook

Posted on 2002-04-06
13
160 Views
Last Modified: 2008-02-01
Hi,

I have made a connection between access2000 and outlook, I can see the table with the emails in access, and run SQL searches on it, but when I try to connect from VB to the access table, I get an error:

Microsoft JET Database Engine (0x80004005)
There are no MAPI clients installed on this machine. Install a MAPI client (like Outlook) on this machine.

I changed Outlook2000 installtion to work as "corporate or workgroup" and I can see the "MAPISP32.exe" running in the task manager.

Any ideas ?
0
Comment
Question by:asabi
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
Hi asabi,

-assuming you pasted the code from access to vb?
-can you run this code?

Sub testOutlook()
    Dim objApp As Application
    Dim objNS As NameSpace
    Dim objInbox As MAPIFolder
   
    Set objApp = CreateObject("Outlook.Application")
    Set objNS = objApp.GetNamespace("MAPI")
    Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
   
    Set objInbox = Nothing
    Set objNS = Nothing
    Set objApp = Nothing
End Sub


:O)Bruintje
0
 
LVL 1

Author Comment

by:asabi
Comment Utility
Well, I just now managed to make it run in VB, I was trying to use the same code to access it through an ASP page and I get the same error.

this is my ASP code, the equivilant in VB works .. for that one I get the same error message:

Microsoft JET Database Engine (0x80004005)
There are no MAPI clients installed on this machine. Install a MAPI client (like Outlook) on this machine.


<%
set objConn = server.createObject("ADODB.CONNECTION")
SET objRec = Server.CreateObject("ADODB.Recordset")


With objConn
        .Provider = "Microsoft.JET.OLEDB.4.0"
        .ConnectionString = "Exchange 4.0;" _
                            & "MAPILEVEL=Personal Folders|;" _
                            & "PROFILE=Microsoft Outlook Internet Settings;" _
                            & "TABLETYPE=0;DATABASE=" & Server.MapPath ("outlook.mdb")
        .Open
    End With
   
    With objRec
        .Open "Select * from Contacts", objConn, adOpenStatic, _
               adLockReadOnly
        .MoveFirst
            response.write (objRec(0).Name & " " & objRec(0).Value)
            response.write (objRec(1).Name & " " & objRec(1).Value)
        .Close
    End With

set objrec=nothing
objConn.close
set objconn = nothing
%>
0
 
LVL 12

Expert Comment

by:roverm
Comment Utility
It prob has to do something with access rights.
When connecting via ASP your are using the I_USER account, not your default account.

Try moving the outlook.mdb to your inetpub/wwwroot folder and make sure to set all security levels on it correct.

D'Mzzl!
RoverM
0
 
LVL 1

Author Comment

by:asabi
Comment Utility
The mdb file is already there ..

I changed the access rights to Administrator, and gave it my Administrator password, just to see if it would help, but than I get "Not a valid account name or password" although the account name comes from the "browse" button, and I know that the password is correct ..

Any ideas ?

thnx
0
 
LVL 12

Expert Comment

by:roverm
Comment Utility
Is the Administrator userid/pwd the same as stated in the Outlook profile?
0
 
LVL 1

Author Comment

by:asabi
Comment Utility
Not sure what you mean, I use the same user id both for the windows login and for the ASP page, if that's what you ment.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 12

Expert Comment

by:roverm
Comment Utility
If you login in Windows, you use the Administrator account.
Do you use this account for your Outlook session as well?
0
 
LVL 1

Author Comment

by:asabi
Comment Utility
I use the same account as my windows ..
I was trying Administrator, and mine (in the ASP), but same results, I also trued to give the IIS all the permissions it can on those files... but nothing.
0
 
LVL 12

Expert Comment

by:roverm
Comment Utility
Strange...Still think it has something to do with rights...
0
 
LVL 1

Author Comment

by:asabi
Comment Utility
O.K, I came up with a new idea ..

I can access the information using the Outlook.Application ..

This again works nice from VB, but not from an ASP/PHP page ...

I have read in some articles that microsoft added in service pack 2 a "security" feature ..

When a connection is requested from something that is "untrusted", a confirm message box should pop up asking to confirm .. when I try to create the Outlook.Application object, I can HEAR the popup, but I don't see it .., so after some time the asp/php is expiring ..

Is there anyway to lower the security level in outlook ???

Thanks

Alon
0
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
Comment Utility
no there's not even a registry hack, only some send key solution you can build it yourself or take one from here

http://www.slipstick.com/outlook/esecup.htm

the only way around this is using your own email comp

:O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
could be a solution from an office thread

http://www.dimastr.com/redemption/
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi asabi,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept bruintje's comment(s) as an answer.

asabi, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now