LOTUS CONNECTOR


例:ReadOnly プロパティ
次の例は、ユーザーの入力に従って、ReadOnly プロパティを表示して切り替えるアクションを含みます。

Uselsx "*LSXODBC"
%INCLUDE "lsconst.lss"

Sub Postopen(Source As Notesuidocument)
Set con = New ODBCConnection
Set qry = New ODBCQuery
Set result = New ODBCResultSet
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("ATDB")
qry.SQL = "SELECT * FROM STUDENTS ORDER BY LASTNAME"
result.Execute
...
End Sub

Sub Click(Source As Button)
If result.ReadOnly Then
If Messagebox("Do you want to allow updates?", _
MB_YESNO, "Updates disallowed (ReadOnly)") = IDYES Then
result.ReadOnly = False
End If
Else
If Messagebox("Do you want to disallow updates?", _
MB_YESNO, "Updates allowed") = IDYES Then
result.ReadOnly = True
End If
End If
End Sub

関連項目