I want to Fetch data from oracle’s tabel to Lotus notes view what will be coding.
Subject: Data Transfer
Rupesh
Use DECS. It’s installed with the server, and can be loaded with “load decs”. There’s examples on how to use it in the help file, and in the “Lotus Enterprise Integration” forum.
Ben
Subject: Data Transfer
Hello,
One sample code for you.
Sub Initialize
Dim tmp As String
Set sess = New NotesSession
Set db = sess.CurrentDatabase
Set con = New ODBCConnection
Set qry = New ODBCQuery
Dim checkdoc As NotesDocument
Dim checkview As NotesView
Set result = New ODBCResultSet
'Set checkview=db.GetView(“Status”)
'Set checkdoc=checkview.GetDocumentByKey(“3”,True)
'checkdoc.stime=Now
Set view1=db.GetView(“Test desc”)
Set doc1=view1.GetFirstDocument
If Not doc1 Is Nothing Then
vsrno=Trim(doc1.srno1(0))
End If
If con.ConnectTo (dsnname, usrname, pswd)Then
'Msgbox “Connection successful !!”
Else
Messagebox “Could not connect to Oracle Table”,“No connection”
Exit Sub
End If
Call con.ConnectTo (dtb, usr, pswd)
Set qry.Connection = con
Set result.Query = qry
If vsrno=“” Then
qry.SQL="select * from sapr3.YMPIT_MAT_LNTXT "
result.Execute
If result.IsResultSetAvailable Then
Do Until result.IsEndOfData
Call result.NextRow
'While result.IsResultSetAvailable
Set doc=New NotesDocument(db)
doc.form ="Test"
MatNo = result.GetValue("MATNR")
LineNo= result.GetValue("LINNO")
TEXT1= result.GetValue("TEXT")
Mattype = result.GetValue("MTART")
SerialNo=result.GetValue("SRLNO")
doc.MAT_No=MatNo
doc.Line_No = LineNo
doc.Text = TEXT1
doc.MAT_Type = Mattype
doc.srno1=SerialNo
'On Error Goto errhandle
Call result.UpdateRow
Call doc.ComputeWithForm(False, False )
Call doc.Save( True, True )
'…
Loop
Else
qry.SQL=“select * from sapr3.YMPIT_MAT_LNTXT where SRLNO >'”& vsrno &"’ "
result.Execute
If result.IsResultSetAvailable Then
Do Until result.IsEndOfData
Call result.NextRow
'While result.IsResultSetAvailable
Set doc=New NotesDocument(db)
doc.form ="Test"
MatNo = result.GetValue("MATNR")
LineNo= result.GetValue("LINNO")
TEXT1= result.GetValue("TEXT")
Mattype = result.GetValue("MTART")
SerialNo=result.GetValue("SRLNO")
doc.MAT_No=MatNo
doc.Line_No = LineNo
doc.Text = TEXT1
doc.MAT_Type = Mattype
doc.srno1=SerialNo
'On Error Goto errhandle
Call result.UpdateRow
Call doc.ComputeWithForm(False, False )
Call doc.Save( True, True )
'…
Loop
End If
End If
result.Close(DB_CLOSE)
Else
Messagebox “No data found”, “No data”
Exit Sub
End If
'errhandle:
’ checkdoc.status=“Error”
'Messagebox Cstr(InvDate)
con.Disconnect
End Sub
Thanks,
Saswat
Subject: Data Transfer
The answer is not quite clear, i wanna details. please say , how we can have value in view(lotus) from Oracle table.
Subject: RE: Data Transfer
hi
quite clear answer : you cannot, unless you import values with an action/agent/programm or whatever you want.
notes connectors (AFAIK) are only with db2 (another ibm tool, so…).
just code something with java, use jdbc, for instance, and import your datas.
HTH
PS, all, let me know if I’m wrong,it may be interesting for me ![]()
Subject: Data Transfer
You may need to use Alii or NOtrix tools to do so…
-Vinay