How To Connect with oracle Server

Hai All, I have Connected my notes client to Oracle server through Dsn. Its Working well.

But is there any way to connect the client to Oracle with out help of DSN.

Like.:-ADODB or Else

Please Guide me.

Pawan

Subject: How To Connect with oracle Server

hi pawan…

You can use LEI…to connect to oracle without dsn…

kaushik das

Subject: RE: How To Connect with oracle Server

Dear dada, Thx for ur Prompt response. Dada How I will use LEI.

Can U give me some details logic.

That’s Help me to implement the code

Pawan

Subject: RE: How To Connect with oracle Server

If your Notes client has the Oracle client libraries installed you can use the Lotus connectors to get to Oracle, and dispense with a dsn. The code would look approximately as follows; this example connects to SQL Server and gets some data. You can run this script locally or from the server.

Uselsx “*LSXLC”

Sub Initialize

' ************************************************************************************

' Obtain column1 and column2 through oledb connector.

' ************************************************************************************

Dim lccon As LCConnection

Dim lcresultfieldlist As LCFieldList

Dim lc_column1 As LCField

Dim lc_column2 As LCField

Dim statement As String



Set lccon = New LCConnection("oledb")

With lccon

	.provider = "sqloledb" 

	.server = "yourserver"

	.Database = "yourdatabase"

	.Metadata = "dbo.yourtable"

	.Fieldnames = "column1, column2"

	.Userid = "username"

	.Password = "password"

End With

lccon.Connect

statement = "SELECT column1, column2 FROM yourable where some condition"

Set lcresultfieldlist = New LCFieldList

Call lccon.Execute(statement, lcresultfieldlist)

Set lc_column1 = lcresultfieldlist.Lookup("column1")

Set lc_column2 = lcresultfieldlist.Lookup("column2")

While (lccon.Fetch (lcresultfieldlist) > 0)

	Print lc_column1.Text(0)+ " "+lc_column2.Text(0)

Wend

lccon.Disconnect

End Sub

For Oracle there would be a few differences, the connection argument would be “oracle” or “oracle8” I think.

All that stuff is documented in the Lotus Connectors Lotusscript Extension guide under \help.

If having the Oracle libraries installed on the desktop is impractical I suppose you could install the libraries on the server instead and run the same script through notesagent.runonserver.

For large scale data integration you should look at DECS and/or LEI, or Lotus Enterprise Integrator. For that, see the EI forum .