473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Domino VBA

Hi,
I am trying to read data from a domino databases (located in our LAN
not on my local machine!) from my access project. I pass a code to the
function checkCodeInDomino to be verified on Domino. On my local
machine everything went fine, but suddenly there came up following
problem:

I was coding and testing with the code below, and I have never been
asked for my lotus password, now when starting my function, there comes
a box up (dont know why this changed?) where I have to enter my lotus
password, when entering my notes password, my function works fine.
But I have to distribute my application to other clients and users, and
it doesnt make sense to use my password.
So I received a public account from our domino admin, for all of us.
When using "DomSession.Initialize (publicLotusPassword)" there are no
errors.
But the problem is, that that's not a real solution for my
appliacation, because each user has to enter his own password, I dont
want that,
but entering a hard coded password doesnt work, because the password
that is asked is referring to
"c:\lotus\notes\data\wk\$userName.ID"

Is there any way to use "DomSession.Initialize" in some kind of a
"generic" way, so that any other user can use the function
"checkCodeInDomino"?
Please remember that the domino database is always on a remote machine
and
"'DomSession.InitializeUsingNotesUserName($Adm in, $Pass)"
does not work!

Here is my code...

Function checkCodeInDomino(checkCode As Long)
On Error GoTo Err_Quit_Click

Dim DomDir As NotesDatabase
Dim DomContacts As NotesView
Dim DomDoc As NotesDocument
Dim StrName As String

Dim DomSession As NotesSession
Dim serverName As String
Dim databaseFile As String

Set DomSession = CreateObject("Lotus.NotesSession")
serverName = "myServerName"
databaseFile = "myFile"

DomSession.Initialize

Set DomDir = DomSession.GetDatabase(serverName, databaseFile)
Set DomContacts = DomDir.GetView("myView")
Set DomDoc = DomContacts.GetFirstDocument

While Not (DomDoc Is Nothing)

If DomDoc.GetItemValue("Dealer_Code")(0) = checkCode Then
checkCodeInDomino = True
Exit Function
End If
Set DomDoc = DomContacts.GetNextDocument(DomDoc)
Wend

checkCodeInDomino = False

Exit_Quit_Click:
Exit Function

Err_Quit_Click:
MsgBox Err.Description
Resume Exit_Quit_Click

End Function

Thank you for your attention!

Peter Neumaier

Nov 13 '05 #1
3 4409
I think you'll have more luck asking in a newsgroup related to Notes or
Domino, as opposed to a database group.

Have you tried looking for documentation at http://www.lotus.com?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,
I am trying to read data from a domino databases (located in our LAN
not on my local machine!) from my access project. I pass a code to the
function checkCodeInDomino to be verified on Domino. On my local
machine everything went fine, but suddenly there came up following
problem:

I was coding and testing with the code below, and I have never been
asked for my lotus password, now when starting my function, there comes
a box up (dont know why this changed?) where I have to enter my lotus
password, when entering my notes password, my function works fine.
But I have to distribute my application to other clients and users, and
it doesnt make sense to use my password.
So I received a public account from our domino admin, for all of us.
When using "DomSession.Initialize (publicLotusPassword)" there are no
errors.
But the problem is, that that's not a real solution for my
appliacation, because each user has to enter his own password, I dont
want that,
but entering a hard coded password doesnt work, because the password
that is asked is referring to
"c:\lotus\notes\data\wk\$userName.ID"

Is there any way to use "DomSession.Initialize" in some kind of a
"generic" way, so that any other user can use the function
"checkCodeInDomino"?
Please remember that the domino database is always on a remote machine
and
"'DomSession.InitializeUsingNotesUserName($Adm in, $Pass)"
does not work!

Here is my code...

Function checkCodeInDomino(checkCode As Long)
On Error GoTo Err_Quit_Click

Dim DomDir As NotesDatabase
Dim DomContacts As NotesView
Dim DomDoc As NotesDocument
Dim StrName As String

Dim DomSession As NotesSession
Dim serverName As String
Dim databaseFile As String

Set DomSession = CreateObject("Lotus.NotesSession")
serverName = "myServerName"
databaseFile = "myFile"

DomSession.Initialize

Set DomDir = DomSession.GetDatabase(serverName, databaseFile)
Set DomContacts = DomDir.GetView("myView")
Set DomDoc = DomContacts.GetFirstDocument

While Not (DomDoc Is Nothing)

If DomDoc.GetItemValue("Dealer_Code")(0) = checkCode Then
checkCodeInDomino = True
Exit Function
End If
Set DomDoc = DomContacts.GetNextDocument(DomDoc)
Wend

checkCodeInDomino = False

Exit_Quit_Click:
Exit Function

Err_Quit_Click:
MsgBox Err.Description
Resume Exit_Quit_Click

End Function

Thank you for your attention!

Peter Neumaier

Nov 13 '05 #2
Hi Douglas,

thank you for your answer, but I think that my problem is more VBA and
ACCES than it is to domino databases.

So the only problem I have to solve is, how to use a default password
when accessing the domino database ...

For sure I found documentation on lotus.com, but there isnt anything
regarding my problem
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:<0c********************@rogers.com>...
I think you'll have more luck asking in a newsgroup related to Notes or
Domino, as opposed to a database group.

Have you tried looking for documentation at http://www.lotus.com?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,
I am trying to read data from a domino databases (located in our LAN
not on my local machine!) from my access project. I pass a code to the
function checkCodeInDomino to be verified on Domino. On my local
machine everything went fine, but suddenly there came up following
problem:

I was coding and testing with the code below, and I have never been
asked for my lotus password, now when starting my function, there comes
a box up (dont know why this changed?) where I have to enter my lotus
password, when entering my notes password, my function works fine.
But I have to distribute my application to other clients and users, and
it doesnt make sense to use my password.
So I received a public account from our domino admin, for all of us.
When using "DomSession.Initialize (publicLotusPassword)" there are no
errors.
But the problem is, that that's not a real solution for my
appliacation, because each user has to enter his own password, I dont
want that,
but entering a hard coded password doesnt work, because the password
that is asked is referring to
"c:\lotus\notes\data\wk\$userName.ID"

Is there any way to use "DomSession.Initialize" in some kind of a
"generic" way, so that any other user can use the function
"checkCodeInDomino"?
Please remember that the domino database is always on a remote machine
and
"'DomSession.InitializeUsingNotesUserName($Adm in, $Pass)"
does not work!

Here is my code...

Function checkCodeInDomino(checkCode As Long)
On Error GoTo Err_Quit_Click

Dim DomDir As NotesDatabase
Dim DomContacts As NotesView
Dim DomDoc As NotesDocument
Dim StrName As String

Dim DomSession As NotesSession
Dim serverName As String
Dim databaseFile As String

Set DomSession = CreateObject("Lotus.NotesSession")
serverName = "myServerName"
databaseFile = "myFile"

DomSession.Initialize

Set DomDir = DomSession.GetDatabase(serverName, databaseFile)
Set DomContacts = DomDir.GetView("myView")
Set DomDoc = DomContacts.GetFirstDocument

While Not (DomDoc Is Nothing)

If DomDoc.GetItemValue("Dealer_Code")(0) = checkCode Then
checkCodeInDomino = True
Exit Function
End If
Set DomDoc = DomContacts.GetNextDocument(DomDoc)
Wend

checkCodeInDomino = False

Exit_Quit_Click:
Exit Function

Err_Quit_Click:
MsgBox Err.Description
Resume Exit_Quit_Click

End Function

Thank you for your attention!

Peter Neumaier

Nov 13 '05 #3
While I recognize that you're experiencing the problem using automation from
VBA, you're still issuing commands to directly to Domino. I would think that
people more familiar with the Domino programming model would be better able
to help than people familiar with VBA.

YMMV, though.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:98**************************@posting.google.c om...
Hi Douglas,

thank you for your answer, but I think that my problem is more VBA and
ACCES than it is to domino databases.

So the only problem I have to solve is, how to use a default password
when accessing the domino database ...

For sure I found documentation on lotus.com, but there isnt anything
regarding my problem
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:<0c********************@rogers.com>...
I think you'll have more luck asking in a newsgroup related to Notes or
Domino, as opposed to a database group.

Have you tried looking for documentation at http://www.lotus.com?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
> Hi,
> I am trying to read data from a domino databases (located in our LAN
> not on my local machine!) from my access project. I pass a code to the
> function checkCodeInDomino to be verified on Domino. On my local
> machine everything went fine, but suddenly there came up following
> problem:
>
> I was coding and testing with the code below, and I have never been
> asked for my lotus password, now when starting my function, there comes
> a box up (dont know why this changed?) where I have to enter my lotus
> password, when entering my notes password, my function works fine.
> But I have to distribute my application to other clients and users, and
> it doesnt make sense to use my password.
> So I received a public account from our domino admin, for all of us.
> When using "DomSession.Initialize (publicLotusPassword)" there are no
> errors.
> But the problem is, that that's not a real solution for my
> appliacation, because each user has to enter his own password, I dont
> want that,
> but entering a hard coded password doesnt work, because the password
> that is asked is referring to
> "c:\lotus\notes\data\wk\$userName.ID"
>
> Is there any way to use "DomSession.Initialize" in some kind of a
> "generic" way, so that any other user can use the function
> "checkCodeInDomino"?
> Please remember that the domino database is always on a remote machine
> and
> "'DomSession.InitializeUsingNotesUserName($Adm in, $Pass)"
> does not work!
>
> Here is my code...
>
> Function checkCodeInDomino(checkCode As Long)
> On Error GoTo Err_Quit_Click
>
> Dim DomDir As NotesDatabase
> Dim DomContacts As NotesView
> Dim DomDoc As NotesDocument
> Dim StrName As String
>
> Dim DomSession As NotesSession
> Dim serverName As String
> Dim databaseFile As String
>
> Set DomSession = CreateObject("Lotus.NotesSession")
> serverName = "myServerName"
> databaseFile = "myFile"
>
> DomSession.Initialize
>
> Set DomDir = DomSession.GetDatabase(serverName, databaseFile)
> Set DomContacts = DomDir.GetView("myView")
> Set DomDoc = DomContacts.GetFirstDocument
>
> While Not (DomDoc Is Nothing)
>
> If DomDoc.GetItemValue("Dealer_Code")(0) = checkCode Then
> checkCodeInDomino = True
> Exit Function
> End If
> Set DomDoc = DomContacts.GetNextDocument(DomDoc)
> Wend
>
> checkCodeInDomino = False
>
> Exit_Quit_Click:
> Exit Function
>
> Err_Quit_Click:
> MsgBox Err.Description
> Resume Exit_Quit_Click
>
> End Function
>
> Thank you for your attention!
>
> Peter Neumaier
>

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Discenza | last post by:
I'm working on a new system that my superiors have determined should use LDAP for it's authentication and user management. Not real bad, but it's proving to be a bit of a hassel. I'm using a...
11
by: Christian Patterer | last post by:
Hi, Even after searching the web for hours, I can't get my PHP configuration work. I have Apache and PHP installed. Now I want to use the mail() function in PHP. On the Linux server I have...
3
by: Peter Neumaier | last post by:
Hi, I am trying to read data from a domino databases (located in our LAN not on my local machine!) from my access project. I pass a code to the function checkCodeInDomino to be verified on Domino....
5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
4
by: Kevin Yu | last post by:
hi all is there any managed component out there to send out email through the domino email server?? Kevin
2
by: gabriel.salama | last post by:
I am desperately trying to create a login page in ASP.NET in which a user can be authenticated against a Domino Directory but for the life of me, I cannot even find anything remotely close to this...
0
by: shenanwei | last post by:
We just upgraded DB2 UDB workgroup Edition on Windows 2003 from V8.1.5 to V8.2.3, server and client with no problem. Domino server is V6.0.2CF2 on Windows 2003 on another machine, DB2 client is...
0
by: VooDoo | last post by:
Hi, I am using domino email group to send notifications. I would like to keep a record of the email sent, but also the list of the person that are in the group. Currently i just send an smtp...
0
by: gilles.carali | last post by:
Bonjour, J'ai deux serveurs Domino Notes (A et B) en cluster qui se connectent à l' AS400 via DB2 ou ODBC. Configuration : Win2000, Domino Notes V5.013a Client Access Express en V4.5 (SP...
3
by: carmelo | last post by:
Hi guys, anyone knows the algorithm of the domino game? i was thinking at the shortest common substring algorithm, but it doesn't work because when you play, you can turn the dominos ,it must be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.