Solved

connecting to outlook

Posted on 2002-04-06
13
163 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
ID: 6923163
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
ID: 6923175
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
ID: 6923621
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 1

Author Comment

by:asabi
ID: 6951251
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
ID: 6952705
Is the Administrator userid/pwd the same as stated in the Outlook profile?
0
 
LVL 1

Author Comment

by:asabi
ID: 6952717
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
 
LVL 12

Expert Comment

by:roverm
ID: 6952842
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
ID: 6959604
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
ID: 6972982
Strange...Still think it has something to do with rights...
0
 
LVL 1

Author Comment

by:asabi
ID: 6991393
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
ID: 6991578
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
ID: 6991727
could be a solution from an office thread

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

Expert Comment

by:DanRollins
ID: 7642981
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 572
Change the path of the data source in my Excel pivot table with macro 4 47
Help me. 3 60
Child Form in front 4 49
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

809 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