Error: 80040108 after 380 CreateObject("M API.Session")
Function MAPI_Test2()
Dim i As Integer
Dim MySession As MAPI.Session
i = 0
While (i < 2000)
Set MySession = CreateObject("M API.Session")
Debug.Print i
i = i + 1
Set MySession = Nothing
DoEvents
Wend
End Function
Any ideas?
Best regards
Ottar 4 5036
You are Dim'ing MySeesion as MAPI.Session which you cannot do without
setting a reference. If you want to use early binding, set a reference. If
you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthl ing.net> wrote in message
news:43******** *************** **@posting.goog le.com... Error: 80040108 after 380 CreateObject("M API.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("M API.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
No success unfornunatly, tried Dim MySession As Object same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("M API.Session")
Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3 PC's
with same result.
Best regards
Ottar
"Arvin Meyer" <a@m.com> wrote in message
news:#3******** ******@TK2MSFTN GP09.phx.gbl... You are Dim'ing MySeesion as MAPI.Session which you cannot do without setting a reference. If you want to use early binding, set a reference. If you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that. -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthl ing.net> wrote in message news:43******** *************** **@posting.goog le.com... Error: 80040108 after 380 CreateObject("M API.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("M API.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
No success unfornunatly, tried Dim MySession As Object; same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("M API.Session")
Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3 PC's
with same result.
Best regards
Ottar
"Arvin Meyer" <a@m.com> wrote in message news:<#3******* *******@TK2MSFT NGP09.phx.gbl>. .. You are Dim'ing MySeesion as MAPI.Session which you cannot do without setting a reference. If you want to use early binding, set a reference. If you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that. -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthl ing.net> wrote in message news:43******** *************** **@posting.goog le.com... Error: 80040108 after 380 CreateObject("M API.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("M API.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
"Ottar L. Osen" <la************ *@earthling.net > wrote in message
news:O3******** ******@TK2MSFTN GP12.phx.gbl... No success unfornunatly, tried Dim MySession As Object same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("M API.Session") Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3
PC's with same result.
I did try it on my PC, and it worked with the one change I showed.
I was able to generate 2000 counts in the debug window. Keep in mind that I
have a GB of memory, so I probably have enough to allocate to all those
instances of MAPI.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads: http://www.datastrat.com http://www.mvps.org/access This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Fie Fie Niles |
last post by:
I have IIS installed on XP Professional workstation machine. I have an ASP
page that open connection to an Access database, then when trying to update
the database, it gave me the error "cannot update database or object is
read-only". This is a workstation machine, not connected to any other
computer, and I login to the PC using an administrator account. I already
check the .MDB file is NOT read-only. But, I do not see the .LDB file....
|
by: bajopalabra |
last post by:
hi
session("myVar") = rs.getRows( )
don't work when number of records
is greater than 10
does anybody know WHY ???
is it a Session object limitation ???
thanks
|
by: Ottar |
last post by:
I've made a program sorting incomming mail in public folder.
The function runs every minute by using the form.timer event.
In Access XP it runs for weeks, no problem. Access 2003 runs the same
code for 6 hours and stops.
I've found the problem to be the Set MySession =
CreateObject("MAPI.Session")
|
by: dee |
last post by:
Hi
My code complies the following line:
Session("passed") = 1
but puts wiggly error line under the second Session("passed") in the
following expression:
Session("passed") = Session("passed") + 1
Why?
Thanks
Dee.
|
by: thomson |
last post by:
Hi,
i create a session variable in C# as follows Session ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
| |
by: Paul |
last post by:
Hi All,
In my application, I wished to check certain things on each page
load, so rather than paste the same code in each pages constructor, I
thought it would be more logical to inherit from Page and place the
code in there. Then each webpage will inherit from my modified page
class. This works fine, but if I try and access the Session from the
modified page class, I get the following error:
Session state can only be used when...
|
by: PShark |
last post by:
Hi
I have a VB6 app that uses MAPI to send and receive emails. My users are able to use the app to send emails successfully, but when there are new emails in the mailbox, the program opens the email but then raises the following error:
"Automation error – The object invoked has disconnected from its clients."
The same program is installed on over 30 workstations which have roughly the same config Windows Xp and outlook 2003. The error is...
|
by: patelxxx |
last post by:
Hi Guy's,
I'm getting the error: "Username or password did not match" BEFORE I even enter a username and password, can someone help?
1) The site I'm accessing is: http://www.valuemapping.co.uk/VMSE/
2) Then I click/select the following application: "VMSE Reporting" and get the above error.
The CGI script for this is:
|
by: Kosmos |
last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked and the fields were populated properly, when I added all the rest, it wouldn't run and even when I tried to go back, it still won't run now...I am getting the following error message:
"Either BOF or EOF is True, or the current record has been...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |