Solved

connecting to outlook

Posted on 2002-04-06
13
161 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

919 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

15 Experts available now in Live!

Get 1:1 Help Now