Lotus Script & Oracle

Hi there!

I have a query regarding the DSN Connection that we make in order to connect to

Oracle Database through Lotus Script.

The thing is that I need to write Agents which connects to Oracle Database and

fetches data from the Database.

I have a form (Form Name:Form1) on which I ve kept 3 editable Text fields:

  1. for DSN Name

  2. for Username

  3. Password

now I want that my agents shud pick the values from those fields to connect to

database.Everytime a User logs on, he is going to enter the values in those fields. How do I get those values in the statement below.

ODBCConnection.ConnectTo(“DSN Name”,“Username”,“Password”)

How should I go about doing it??

Subject: Lotus Script & Oracle

You may create profile form to do.

Subject: RE: Lotus Script & Oracle

Could you plz elaborate… actually I m new to Lotus…What is profile form?

Subject: Lotus Script & Oracle

Question: Do you actually need to connect to Oracle using the user’s credentials? If you need user-specific data, you could create a generic Oracle login account with the necessary level of access and structure your query to pull back only that user’s data. That way, your application would be more seamless.

You wouldn’t have to worry about users typing in their Oracle login information incorrectly. Or forgetting their password. Or worry about whether Oracle requires passwords changes every x number of days.

And there’s no need to require the user to enter the DSN name. Unless you’re having the users set that up themselves? From a maintenance perspective, the DSN should be set up the same on everyone’s workstation.

Hope that helps.

Subject: Lotus Script & Oracle

Before calling your odbc get a handle on the document as doc, if the document is open on screen do as follows

dim ws as new notesuiworkspace

dim uidoc as notesuidocument

dim doc as notesdocument

set uidoc = ws.currentdocument

set doc = uidoc.document

then get the dns,username and password as below and call the odbcconnect

dim userdetails(2) as string

userdetails(0) = doc.1(0)

userdetails(1) = doc.2(0)

userdetails(2) = doc.3(0)

call odbcconnection.connectto(userdetails(0),userdetails(1),userdetails(2))

where doc.1 2 and 3 are the three editable fields (replace numbers with name of fields)