'queries the table Contacts.
qry.SQL = "SELECT * FROM Contacts"
'result is what temp stores the value and is pointing to the execute
command.
result.Execute
Set doc = view.GetFirstDocument
While Not(doc Is Nothing)
'If the value is empty then get the next document else get the
document that you are pointing at.
If result.IsValueNull(uidoc.CurrentField) Then
Set doc = view.GetNextDocument(doc)
'update the value and adds it to the row
result.AddRow
Call result.SetValue("FirstName",doc.FirstName(0))
Call result.SetValue("LastName",doc.LastName(0))
Call result.SetValue("Company",doc.Company(0))
result.UpdateRow
Set doc = view.GetNextDocument(doc)
Else
result.AddRow
Call result.SetValue("FirstName",doc.FirstName(0))
Call result.SetValue("LastName",doc.LastName(0))
Call result.SetValue("Company",doc.Company(0))
result.UpdateRow
Set doc = view.GetNextDocument(doc)
End If
Wend
result.Close(DB_CLOSE)
con.Disconnect
|
Otros documentos de LotusScript
|