Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

HELP with COM in VB - NotesSession.Initialize = Abnormal Program Termination

98 views
Skip to first unread message

kr33p

unread,
Apr 24, 2003, 4:06:01 PM4/24/03
to
This is a discussion from a post that I made at the IBM Lotus support
forums. Nobody seems to be of any help and I'm hoping that maybe
someone on Usenet may know something.

Please respond to my email as well as in the group if you can help.
TIA!

-----------------------------------------------------------------

Hi all, Notes beginner here. I have a problem that I'm hoping someone
could comment on. I have Lotus Domino R5 with client installed on a
Windows 2000 Server. I have 3 applications that access the same
database to perform certain tasks such as importing data, updating
data, etc. One runs every 24 hours and the other two run every couple
minutes.

The problem that I'm seeing is that after a week or two of execution,
they all start to crash. The applications that run every couple
minutes don't die completely and you can see tons of the processes
left running. This eventually causes virtual memory errors but that's
not the point.

I installed VB6 on the server to see what was happening as I stepped
through the code. When we make the call to NotesSession.Initialize,
the C++ Runtime Error msg box pops up and gives the message that an
Abnormal Program Termination occured and the VB development
environment crashes.

I'm suspecting that my apps are getting locked out of an .ID file for
some reason since the .Initialize method simply associates a
NotesSession object with a UserID before making the call to open a
database.

This assumption is further supported by the fact that a server reboot
fixes the problem (temporarily).

All of my 3 applications use the same .Initialize method which means
they're all using the same User information to log in.

Could it be that after a certain amount of time there is a conflict
between the 3 applications attempting to access the same resources
simultaneously? Maybe we just don't see it happen until all three are
just right? Could it be the multiple session objects? Each app only
uses a single session object at a time, but what if all three had one
at the same time?

I'm by no means a Notes development guru, so any information, no
matter how obvious, would be appreciated.

Thanks, karl

-----------------------------------------------------------------


Posted by Duvvuri D Prasad on 22.Apr.03 at 04:16 PM using a Web
browser
Category: Third-Party Tools -- OtherRelease: All ReleasesPlatform:
Windows 2000
I had a VB exe file which is running on the server every 2 min. and it
is accessing notes just fine. the program runs on the server machine
and here is the following code i used.

Below is the code, nd i am using 5.06 with the COM stuff i dowloaded
from notes.net


Let me know if u need further help.

THanks,
Durga


'************************************
' Variables for Accessing the Notes
'************************************
Dim session As Object
Dim db As Object
Dim doc As Object
Dim faxUser As Object
Dim faxRec As Object
Dim faxSubject As Object
Dim faxFile As Object
Dim faxStatus As Object
Dim NtsAttachedObject As Object
Dim it1 As Object
Dim exeFax As String
Dim submitFax As Integer

Dim str As String
Dim atname As String
'******************************
' Notes Constants
'******************************
Const NtsATTACHMENT As Integer = 1084
Const NtsAUTHORS As Integer = 1076
Const NtsDATETIMES As Integer = 1024
Const NtsERRORITEM As Integer = 256
Const NtsFORMULA As Integer = 1539
Const NtsHTML As Integer = 21
Const NtsICON As Integer = 6
Const NtsNAMES As Integer = 1074
Const NtsNOTELINKS As Integer = 7
Const NtsNOTEREFS As Integer = 4
Const NtsNUMBERS As Integer = 768
Const NtsOTHEROBJECT As Integer = 1085
Const NtsREADERS As Integer = 1075
Const NtsRICHTEXT As Integer = 1
Const NtsSIGNATURE As Integer = 8
Const NtsTEXT As Integer = 1280
Const NtsUNAVAILABLE As Integer = 512
Const NtsUNKNOWN As Integer = 0
Const NtsUSERDATA As Integer = 14
Const NtsUSERID As Integer = 1792
Const NtsEMBED_ATTACHMENT As Integer = 1454
'******************************
' Accessing Notes
'******************************
'For running on Local Machine
'********************************
'Set session = CreateObject("Notes.NotesSession")
'Set db = session.GetDatabase("servername", "faxtest.nsf")
'********************************
'For running on Server
'**********************************
Set session = CreateObject("Lotus.NotesSession")
Call session.InitializeUsingNotesUserName("Durga Prasad", "password")
Set db = session.GetDatabase("", "faxtest.nsf")
'******************************************
Set view = db.GetView("Status")
'*****************************
' Accessing all documents from Status View
'*****************************
Set doc = view.GetFirstDocument
If doc Is Nothing Then
MsgBox "View is Empty"
Call pend
End If


-----------------------------------------------------------------

Posted by karl r dembeck on 23.Apr.03 at 11:29 AM using a Web browser
Category: Third-Party Tools -- OtherRelease: All ReleasesPlatform:
Windows 2000
Thank you Durga for responding. My code is by the book just like yours
and runs fine for a couple weeks. My problem is that I *think* that
after a while I'm getting locked out of an .ID file. All of my apps
use the same notes ID (using .Initialize method instead of specifying
user name like your code does). I'm wondering if anybody could respond
as to how that might happen. I've seen posts that say that if the
notes ID in notes.ini (KeyFileName i believe it is) is invalid then
you will receive an "Abnormal Program Termination" as soon as you call
the .Initialize method of the NotesSession object. Because this does
indeed work for a while, I know that the notes.ini file contains a
valid ID. So my assumption is that after a while the ID becomes
invalid, meaning that the ID file becomes inaccessible for some
reason. To make it accessible again, the only thing that I've found to
work is a reboot.

Any other ideas?

Thanks,
Karl

0 new messages