Link to home
Start Free TrialLog in
Avatar of asabi
asabi

asked on

connecting to outlook

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 ?
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

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
Avatar of asabi
asabi

ASKER

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
%>
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
Avatar of asabi

ASKER

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
Is the Administrator userid/pwd the same as stated in the Outlook profile?
Avatar of asabi

ASKER

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.
If you login in Windows, you use the Administrator account.
Do you use this account for your Outlook session as well?
Avatar of asabi

ASKER

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.
Strange...Still think it has something to do with rights...
Avatar of asabi

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
could be a solution from an office thread

http://www.dimastr.com/redemption/
Avatar of DanRollins
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