Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

connecting to outlook

Posted on 2002-04-06
13
Medium Priority
?
167 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 800 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

963 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