Anonymous_User Absent Member.
Absent Member.
2841 views

AddressBookEntries Find Method against large address book

Groupwise API AddressBookEntries Find method
I am having trouble using the AddressBookEntries Find method. My basic
task is to retreive all recipients that match a particular string "name*"
so this is what I have (sorry I cannot put the "exact" code)...

I loop over all address books
Get the address book
get the AddressBookEntries
Create a filter =
"(<First Name> CONTAINS "name*") OR (<Last Name> CONTAINS "name*") OR
(<E-Mail Address> CONTAINS "name*")"

I then do the Find call and all is well... unless of course I have a
"large" address book with a large number of recipients. I have tested
against 150,000 and 15,000 and neither of those work. They will throw "An
Unhandled Exception" exception without any additional error information.
Is there any "undocumented" limits on what the API is able to handle when
using this function or is this an actual problem? Do you need to see code
before diagnosing?

Thanks
Tony

Labels (1)
0 Likes
9 Replies
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

It would be easiest if I could reproduce the problem
on the user data.
Would it be possible to send me privately the
wphost.db, ngwguard.db and userxxx.db where
xxx is the fid of the user to try?

Can you also send my the values in the filter ("name")?
I also assume this is a personal address book and not
the system address book, right?

Also, is it using the MAPI address books or GroupWise
address books (Account.MultiLoginAddressBookSupport = true)

Thanks.
Preston
pstephenson@novell.com

>>> On Monday, January 28, 2008 at 6:54 AM, Tony

Maimone<anthony.maimone@onbase.com> wrote:
> Groupwise API AddressBookEntries Find method
> I am having trouble using the AddressBookEntries Find method. My basic
> task is to retreive all recipients that match a particular string "name*"


> so this is what I have (sorry I cannot put the "exact" code)...
>
> I loop over all address books
> Get the address book
> get the AddressBookEntries
> Create a filter =
> "(<First Name> CONTAINS "name*") OR (<Last Name> CONTAINS "name*") OR
> (<E-Mail Address> CONTAINS "name*")"
>
> I then do the Find call and all is well... unless of course I have a
> "large" address book with a large number of recipients. I have tested
> against 150,000 and 15,000 and neither of those work. They will throw "An


> Unhandled Exception" exception without any additional error information.
> Is there any "undocumented" limits on what the API is able to handle when


> using this function or is this an actual problem? Do you need to see code


> before diagnosing?
>
> Thanks
> Tony

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

Preston,

Thank you for your quick response. I am unable to retrieve the files from
our Groupwise server at this time. I can better explain the problem now
that I re-read what I wrote. It is a GroupWise 6.5.0 (2/3/03) Client and I
have 200 GroupWise recipents in my system address book. However, I have
15,000 personal contacts for testing purposes. Each contact only has the
email address and display set in the address book, there is no first,
middle, or last name set.

The users were create with "User *" being the display and
"User*@testdomain.com" being the email address. The * is replaced by a
number between 1 and 15000. I am sending the exported .NAB to your email
account.

The filter that I searched for was "user*", "user1*", "user 1*" so on and
so forth.

If you have ant other questions... please let me know.

Thank you,
Tony

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

I believe your problem is that the filter parser does not handle
nested parentheses.
Here is my test program.

Private Sub btnTest_Click()
Dim gwApp As Application5
Dim gwAcct As Account8
Dim gwBook As AddressBook2
Dim gwBooks As AddressBooks2
Dim gwEntries As AddressBookEntries2
Dim gwAddresses As Addresses

Dim str As String

str = "/ipa-" & txtServer.Text & " /ipp-" & txtPort.Text
Set gwApp = CreateObject("NovellGroupWareSession")
gwApp.MultiLoginAddressBookSupport = True
Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str, txtPassword.Text)

Set gwBooks = gwAcct.AddressBooks
Set gwBook = gwBooks.Item("TestUsers")
Set gwEntries = gwBook.AddressBookEntries

str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & "
OR <Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & " OR <E-Mail
Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & ")"

' str = "(<Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
")"
' str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
")"
' str = "(<E-Mail Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)
& ")"
Set gwAddresses = gwEntries.Find(str)
MsgBox "Count = " & gwAddresses.Count
Set gwAddresses = Nothing
Set gwEntries = Nothing
Set gwBook = Nothing
Set gwBooks = Nothing
Set gwAcct = Nothing
Set gwApp = Nothing
End Sub

Check to make sure you only have the outside parentheses.
Let me know if you still have a problem.

Preston

>>> On Monday, January 28, 2008 at 6:54 AM, Tony

Maimone<anthony.maimone@onbase.com> wrote:
> Groupwise API AddressBookEntries Find method
> I am having trouble using the AddressBookEntries Find method. My basic
> task is to retreive all recipients that match a particular string "name*"


> so this is what I have (sorry I cannot put the "exact" code)...
>
> I loop over all address books
> Get the address book
> get the AddressBookEntries
> Create a filter =
> "(<First Name> CONTAINS "name*") OR (<Last Name> CONTAINS "name*") OR
> (<E-Mail Address> CONTAINS "name*")"
>
> I then do the Find call and all is well... unless of course I have a
> "large" address book with a large number of recipients. I have tested
> against 150,000 and 15,000 and neither of those work. They will throw "An


> Unhandled Exception" exception without any additional error information.
> Is there any "undocumented" limits on what the API is able to handle when


> using this function or is this an actual problem? Do you need to see code


> before diagnosing?
>
> Thanks
> Tony

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

Preston,

Is that seriously in the Obj API documentation ANYWHERE! Seriously, if
that is my problem I am going to be rather mad. On page 170, there are
examples of valid filter expressions and there are nested parantheses.
Example: (MAIL OR TASK) AND (NOT HIDDEN).

Anyways... I tested it and it works on one my machines but it does not
work on another machine with the same basic setup (Novell client 4.91 and
GroupWise 7.0). Any ideas?

I am receiving the same "An Unhandled Exception occured" error with an
error code of 0x8000FFFF.

This is becoming a large issue, any more help would be greatly appreciated.

Tony

>Preston Stephenson wrote:


> I believe your problem is that the filter parser does not handle
> nested parentheses.
> Here is my test program.


> Private Sub btnTest_Click()
> Dim gwApp As Application5
> Dim gwAcct As Account8
> Dim gwBook As AddressBook2
> Dim gwBooks As AddressBooks2
> Dim gwEntries As AddressBookEntries2
> Dim gwAddresses As Addresses


> Dim str As String


> str = "/ipa-" & txtServer.Text & " /ipp-" & txtPort.Text
> Set gwApp = CreateObject("NovellGroupWareSession")
> gwApp.MultiLoginAddressBookSupport = True
> Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str, txtPassword.Text)


> Set gwBooks = gwAcct.AddressBooks
> Set gwBook = gwBooks.Item("TestUsers")
> Set gwEntries = gwBook.AddressBookEntries


> str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & "
> OR <Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & " OR <E-Mail
> Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & ")"


> ' str = "(<Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
> ")"
> ' str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
> ")"
> ' str = "(<E-Mail Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)
> & ")"
> Set gwAddresses = gwEntries.Find(str)
> MsgBox "Count = " & gwAddresses.Count
> Set gwAddresses = Nothing
> Set gwEntries = Nothing
> Set gwBook = Nothing
> Set gwBooks = Nothing
> Set gwAcct = Nothing
> Set gwApp = Nothing
> End Sub


> Check to make sure you only have the outside parentheses.
> Let me know if you still have a problem.


> Preston


0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

Maybe this answers it:

http://forge.novell.com/modules/xfref_library/detail.php?reference_id=682


The answer was:

Defects # 270633 and # 100272515: Assigning a complicated filter
expression with multiple parentheses to the Query.Expression method would
sometimes mess up the GroupWise parser with some nesting problems and
change the meaning of the expression. Hence, the search would sometimes
be for the wrong expression. The problem was fixed in GW 6.0 SP1 and in
GW 5.5 EP SP4 (GW 5.5.6.1).


You stated, that your client's was running GW 6.5.0, but you was running 7.0, but I've seen this
error popping up within the different versions of the client.

I agree, that this doesn't covers the versions you are running, but...
Anyway...There's no way, what so ever to be mad, since your client is running a *VERY* old client, IMHO

Be mad, IMHO, if running the latest version, and this is an ongoing issue for the last 3 versions, and
*You* *did* *put* *Novell's* *attention* *to* *this* *issue*

--

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

I do not get the unhandled exception. I'm wondering if
it is a problem in the COM or MAPI DLL's.
Since it works on one machine, I don't think it is a
filter problem.

The filter logic works differently for address book
queries. So the nested queries might work in the
normal queries.

I get an invalid field or operand expected error
on certain invalid filters.

I know one developer was trying to run the GWClient
(which includes the Object API) on a Windows 2003 Server.
This is not a supported platform.

Are both computers on the same OS? If so can you
compare the COM (OLE) and MAPI DLL's?

Preston

>>> On Tuesday, February 05, 2008 at 1:15 PM, Tony

Maimone<anthony.maimone@onbase.com> wrote:
> Preston,
>
> Is that seriously in the Obj API documentation ANYWHERE! Seriously, if
> that is my problem I am going to be rather mad. On page 170, there are
> examples of valid filter expressions and there are nested parantheses.
> Example: (MAIL OR TASK) AND (NOT HIDDEN).
>
> Anyways... I tested it and it works on one my machines but it does not
> work on another machine with the same basic setup (Novell client 4.91 and


> GroupWise 7.0). Any ideas?
>
> I am receiving the same "An Unhandled Exception occured" error with an
> error code of 0x8000FFFF.
>
> This is becoming a large issue, any more help would be greatly

appreciated.
>
> Tony
>
>>Preston Stephenson wrote:

>
>> I believe your problem is that the filter parser does not handle
>> nested parentheses.
>> Here is my test program.

>
>> Private Sub btnTest_Click()
>> Dim gwApp As Application5
>> Dim gwAcct As Account8
>> Dim gwBook As AddressBook2
>> Dim gwBooks As AddressBooks2
>> Dim gwEntries As AddressBookEntries2
>> Dim gwAddresses As Addresses

>
>> Dim str As String

>
>> str = "/ipa-" & txtServer.Text & " /ipp-" & txtPort.Text
>> Set gwApp = CreateObject("NovellGroupWareSession")
>> gwApp.MultiLoginAddressBookSupport = True
>> Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str, txtPassword.Text)

>
>> Set gwBooks = gwAcct.AddressBooks
>> Set gwBook = gwBooks.Item("TestUsers")
>> Set gwEntries = gwBook.AddressBookEntries

>
>> str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &

"
>> OR <Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & " OR

<E-Mail
>> Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & ")"

>
>> ' str = "(<Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
>> ")"
>> ' str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)

&
>> ")"
>> ' str = "(<E-Mail Address> CONTAINS " & Chr(34) & txtQuery.Text &

Chr(34)
>> & ")"
>> Set gwAddresses = gwEntries.Find(str)
>> MsgBox "Count = " & gwAddresses.Count
>> Set gwAddresses = Nothing
>> Set gwEntries = Nothing
>> Set gwBook = Nothing
>> Set gwBooks = Nothing
>> Set gwAcct = Nothing
>> Set gwApp = Nothing
>> End Sub

>
>> Check to make sure you only have the outside parentheses.
>> Let me know if you still have a problem.

>
>> Preston

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

Well, I lied.

It is working for certain queries and not others. I have a Novell Personal
Address Book that contains 15000 users. If I have a match in this address
book, I have NO problems, no errors, everything is returned as expected.
However, if my search string does not exist in this address book, the
error is thrown.

Current search is
"(<First Name> CONTAINS "c*" OR <Last Name> CONTAINS "c*" OR <Name>
CONTAINS "c*")"

The entire address book is filled in this sense...
Email Address = TestUser1@test.com
Display = TestUser 1

There is no other information entered and like I said earlier, there are
15000 entries to give an optional look at a "large" organization. Even
though I know that we have other customers upwards of 500,000 contacts and
my current solution will be amazingly slow for them.

I am on an Win XP Pro SP2 and I just re-installed the Novell Client 4.91
with GroupWise 7.0. On my clients machine, she is running a fresh install
of Win XP Pro SP2 with a fresh install of the Novell Client 4.91 and
GroupWise 7.0.

What versions of the OLE and MAPI files should I have on my machine? Is
there anything that I could be missing?

Tony

Preston Stephenson wrote:

> I do not get the unhandled exception. I'm wondering if
> it is a problem in the COM or MAPI DLL's.
> Since it works on one machine, I don't think it is a
> filter problem.


> The filter logic works differently for address book
> queries. So the nested queries might work in the
> normal queries.


> I get an invalid field or operand expected error
> on certain invalid filters.


> I know one developer was trying to run the GWClient
> (which includes the Object API) on a Windows 2003 Server.
> This is not a supported platform.


> Are both computers on the same OS? If so can you
> compare the COM (OLE) and MAPI DLL's?


> Preston


>>>> On Tuesday, February 05, 2008 at 1:15 PM, Tony

> Maimone<anthony.maimone@onbase.com> wrote:
>> Preston,
>>
>> Is that seriously in the Obj API documentation ANYWHERE! Seriously, if
>> that is my problem I am going to be rather mad. On page 170, there are
>> examples of valid filter expressions and there are nested parantheses.
>> Example: (MAIL OR TASK) AND (NOT HIDDEN).
>>
>> Anyways... I tested it and it works on one my machines but it does not
>> work on another machine with the same basic setup (Novell client 4.91 and


>> GroupWise 7.0). Any ideas?
>>
>> I am receiving the same "An Unhandled Exception occured" error with an
>> error code of 0x8000FFFF.
>>
>> This is becoming a large issue, any more help would be greatly

> appreciated.
>>
>> Tony
>>
>>>Preston Stephenson wrote:

>>
>>> I believe your problem is that the filter parser does not handle
>>> nested parentheses.
>>> Here is my test program.

>>
>>> Private Sub btnTest_Click()
>>> Dim gwApp As Application5
>>> Dim gwAcct As Account8
>>> Dim gwBook As AddressBook2
>>> Dim gwBooks As AddressBooks2
>>> Dim gwEntries As AddressBookEntries2
>>> Dim gwAddresses As Addresses

>>
>>> Dim str As String

>>
>>> str = "/ipa-" & txtServer.Text & " /ipp-" & txtPort.Text
>>> Set gwApp = CreateObject("NovellGroupWareSession")
>>> gwApp.MultiLoginAddressBookSupport = True
>>> Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str, txtPassword.Text)

>>
>>> Set gwBooks = gwAcct.AddressBooks
>>> Set gwBook = gwBooks.Item("TestUsers")
>>> Set gwEntries = gwBook.AddressBookEntries

>>
>>> str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &

> "
>>> OR <Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & " OR

> <E-Mail
>>> Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & ")"

>>
>>> ' str = "(<Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) &
>>> ")"
>>> ' str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)

> &
>>> ")"
>>> ' str = "(<E-Mail Address> CONTAINS " & Chr(34) & txtQuery.Text &

> Chr(34)
>>> & ")"
>>> Set gwAddresses = gwEntries.Find(str)
>>> MsgBox "Count = " & gwAddresses.Count
>>> Set gwAddresses = Nothing
>>> Set gwEntries = Nothing
>>> Set gwBook = Nothing
>>> Set gwBooks = Nothing
>>> Set gwAcct = Nothing
>>> Set gwApp = Nothing
>>> End Sub

>>
>>> Check to make sure you only have the outside parentheses.
>>> Let me know if you still have a problem.

>>
>>> Preston



0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

I am also writing this application in C++, not sure if that changes
anything...

Tony

0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: AddressBookEntries Find Method against large address book

Sorry, I remembered in the night.
There are problems returning large amounts of data.
I've fixed some problems in the Messages.Find in
7.0.3, but address books are a different matter, especially
MAPI address books.

In dealing with large amounts of data, you will have
to go to SOAP, where we expose cursors.
With cursors, you can return chunks of the whole data.
That way you can manage the large amount of data
returned from a query.

There are no plans to expose cursors in the Object API,
at least no more than we do now.

With that said, you should move to 7.0.3 or Bonsai
if you are able to.

Preston

>>> On Tuesday, February 05, 2008 at 2:14 PM, Tony

Maimone<anthony.maimone@onbase.com> wrote:
> Well, I lied.
>
> It is working for certain queries and not others. I have a Novell Personal


> Address Book that contains 15000 users. If I have a match in this address


> book, I have NO problems, no errors, everything is returned as expected.
> However, if my search string does not exist in this address book, the
> error is thrown.
>
> Current search is
> "(<First Name> CONTAINS "c*" OR <Last Name> CONTAINS "c*" OR <Name>
> CONTAINS "c*")"
>
> The entire address book is filled in this sense...
> Email Address = TestUser1@test.com
> Display = TestUser 1
>
> There is no other information entered and like I said earlier, there are
> 15000 entries to give an optional look at a "large" organization. Even
> though I know that we have other customers upwards of 500,000 contacts and


> my current solution will be amazingly slow for them.
>
> I am on an Win XP Pro SP2 and I just re-installed the Novell Client 4.91
> with GroupWise 7.0. On my clients machine, she is running a fresh install


> of Win XP Pro SP2 with a fresh install of the Novell Client 4.91 and
> GroupWise 7.0.
>
> What versions of the OLE and MAPI files should I have on my machine? Is
> there anything that I could be missing?
>
> Tony
>
> Preston Stephenson wrote:
>
>> I do not get the unhandled exception. I'm wondering if
>> it is a problem in the COM or MAPI DLL's.
>> Since it works on one machine, I don't think it is a
>> filter problem.

>
>> The filter logic works differently for address book
>> queries. So the nested queries might work in the
>> normal queries.

>
>> I get an invalid field or operand expected error
>> on certain invalid filters.

>
>> I know one developer was trying to run the GWClient
>> (which includes the Object API) on a Windows 2003 Server.
>> This is not a supported platform.

>
>> Are both computers on the same OS? If so can you
>> compare the COM (OLE) and MAPI DLL's?

>
>> Preston

>
>>>>> On Tuesday, February 05, 2008 at 1:15 PM, Tony

>> Maimone<anthony.maimone@onbase.com> wrote:
>>> Preston,
>>>
>>> Is that seriously in the Obj API documentation ANYWHERE! Seriously, if
>>> that is my problem I am going to be rather mad. On page 170, there are
>>> examples of valid filter expressions and there are nested parantheses.
>>> Example: (MAIL OR TASK) AND (NOT HIDDEN).
>>>
>>> Anyways... I tested it and it works on one my machines but it does not
>>> work on another machine with the same basic setup (Novell client 4.91

and
>
>>> GroupWise 7.0). Any ideas?
>>>
>>> I am receiving the same "An Unhandled Exception occured" error with an
>>> error code of 0x8000FFFF.
>>>
>>> This is becoming a large issue, any more help would be greatly

>> appreciated.
>>>
>>> Tony
>>>
>>>>Preston Stephenson wrote:
>>>
>>>> I believe your problem is that the filter parser does not handle
>>>> nested parentheses.
>>>> Here is my test program.
>>>
>>>> Private Sub btnTest_Click()
>>>> Dim gwApp As Application5
>>>> Dim gwAcct As Account8
>>>> Dim gwBook As AddressBook2
>>>> Dim gwBooks As AddressBooks2
>>>> Dim gwEntries As AddressBookEntries2
>>>> Dim gwAddresses As Addresses
>>>
>>>> Dim str As String
>>>
>>>> str = "/ipa-" & txtServer.Text & " /ipp-" & txtPort.Text
>>>> Set gwApp = CreateObject("NovellGroupWareSession")
>>>> gwApp.MultiLoginAddressBookSupport = True
>>>> Set gwAcct = gwApp.MultiLogin(txtUserId.Text, str,

txtPassword.Text)
>>>
>>>> Set gwBooks = gwAcct.AddressBooks
>>>> Set gwBook = gwBooks.Item("TestUsers")
>>>> Set gwEntries = gwBook.AddressBookEntries
>>>
>>>> str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)

&
>> "
>>>> OR <Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & " OR

>> <E-Mail
>>>> Address> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34) & ")"
>>>
>>>> ' str = "(<Last Name> CONTAINS " & Chr(34) & txtQuery.Text & Chr(34)

&
>>>> ")"
>>>> ' str = "(<First Name> CONTAINS " & Chr(34) & txtQuery.Text &

Chr(34)
>> &
>>>> ")"
>>>> ' str = "(<E-Mail Address> CONTAINS " & Chr(34) & txtQuery.Text &

>> Chr(34)
>>>> & ")"
>>>> Set gwAddresses = gwEntries.Find(str)
>>>> MsgBox "Count = " & gwAddresses.Count
>>>> Set gwAddresses = Nothing
>>>> Set gwEntries = Nothing
>>>> Set gwBook = Nothing
>>>> Set gwBooks = Nothing
>>>> Set gwAcct = Nothing
>>>> Set gwApp = Nothing
>>>> End Sub
>>>
>>>> Check to make sure you only have the outside parentheses.
>>>> Let me know if you still have a problem.
>>>
>>>> Preston

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.