Tuesday, October 20, 2009

IBM Released 8.5.1 lotus designer for free

IBM Released 8.5.1 lotus designer for free.

Its really wonderful...

They have added 3 new field types.
1. Formula
2. Timezone
3. Color



One more feature while writing the code in lotusscript, it shows the errors without saving. Its almost similar to writing code in flex.


Connect ODBC/Oracle Using LC coneector classes

Lotusscript code to connect ODBC/Oracle Using LC coneector classes



Sub Initialize
On Error Goto ErrorHandler

Dim session As New NotesSession
Dim LC_S As New LCSession
LC_S.clearstatus
Set LC_Conn = New LCConnection ("odbc2")

' Make a connection...
LC_Conn.Server = "lotussystem" ‘System DSN on server…
LC_Conn.UserID = "crystal" ‘SQL Server user id…
LC_Conn.Password = "crystal" ‘SQL Server password…
LC_Conn.Metadata = "employee" ‘SQL Server table name…
LC_Conn.Connect

Dim count As Integer
Dim lsQuery As String
Dim fldLst As New LCFieldList

' Execute the Query...
lsQuery = "Select * from employee"
count = LC_Conn. Execute (lsQuery, fldLst)

Dim fldLC As LCField

Dim fldFName As LCField
Set fldFName = fldLst.Lookup ("fname")
Dim fldLName As LCField
Set fldLName = fldLst.Lookup ("lname")

' Get the AppInfo view...
Dim loDb As NotesDatabase
Dim loVw As NotesView
Dim loAppInfoDoc As NotesDocument
Set loDb = session.CurrentDatabase
Set loVw = loDb.GetView("vwAppInfo")
Set loAppInfoDoc = loVw.GetFirstDocument

Call LC_Conn.Fetch (fldLst, 1, 1)
'Msgbox fldFName.Text(0)

loAppInfoDoc.count = "1"
loAppInfoDoc.EmpName = fldFName.Text(0) + " " + fldLName.Text(0)

Set fldLC = fldLst.Lookup ("emp_Id")
loAppInfoDoc.EmpID = fldLC.Text(0)

Set fldLC = fldLst.Lookup ("job_Id")
loAppInfoDoc.Job = Cstr(fldLC.Text(0))

Set fldLC = fldLst.Lookup ("hire_date")
loAppInfoDoc.Hire_Date = Cstr(fldLC.Text(0))

Call loAppInfoDoc.save(False, False)

' Disconnect the connection...
LC_Conn.Disconnect

CleanUp:
Exit Sub

ErrorHandler:
'Msgbox result.GetExtendedErrorMessage,, result.GetErrorMessage
Msgbox "An error has occurred in button at line no. " & Erl() & " and the error is " & Str$(Err) & " " & Error$
Resume CleanUp

End Sub

Search This Blog