如何通过Lotus Script在domino Designer中将表单值保存到DB [英] how to save form values to DB in domino designer by Lotus Script
问题描述
我是Domino设计师和Lotus脚本的新手,
I am new to Domino designer and lotus script,
跟随我的第一个问题
1)如何将表单值保存到DB
1) How can I save form values to DB
2)如何查看数据库(如MS访问权限)
2)How can I view DB( like MS access)
3)如何创建视图以从数据库检索值
3) How to create view to retrieve values from DB
Googled for it but found a link to save to db solution.
我尝试过
Sub Click(Source As Button)
Dim myText As String
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim enteredText As String
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
doc.Form = "Main Topic"
doc.Subject = "Here's a new document"
Call doc.Save( False, False )//I think it is saving here but don'y know where it saves
myText = Inputbox("insert some text :","Testing Heading","Default value",100,100)
Msgbox "you have entered : "+myText
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
doc.addrfield = myText
enteredText = doc.addrfield(0)
Msgbox "Data entered in addrfield : "+ enteredText
End Sub
但是我不知道它在哪里保存表单字段
But I don't know where it is saving my form fields
如果可能,请提供指向讨论数据库和视图以及代码的站点的链接.
If possible please provide links to sites where DB and view are discussed along with codes.
预先感谢
以上解决了!谢谢克努特
The above one is solved! Thanks Knut
我想创建一个Java代理,该代理将为数据库中的数据生成一个文本文件(创建一个简单的报告).
I want to create a Java agent which will generate a text file (create a simple report) of the data in the database .
如何添加Java代理?我如何获取访问数据(表单字段) 数据库?我应该在哪里放置Java代码?
How can I add Java Agent ? How can I get access data(form fields) in the database ? Where should I place the java code?
推荐答案
1)
在doc.addrfield = myText
之后添加Call doc.Save( False, False )
.只有这样才能保存您在文档中所做的更改.
Add Call doc.Save( False, False )
after doc.addrfield = myText
. Only this will save the changes you made in document.
2)+ 3)
在Domino Designer中创建一个表单主要主题",并添加您在打开具有"Form ="主要主题"字段的文档时要查看的字段
Create a form "Main Topic" in Domino Designer and add the fields you want to see when opening a document which has field Form = "Main Topic"
在Domino Designer中创建视图.创建显示您在文档中创建的字段的列
Create a view in Domino Designer. Create columns which show your fields you created in document
4)
阅读此 http://www.redbooks.ibm. com/Redbooks.nsf/RedbookAbstracts/sg246854.html?OpenDocument 作为经典Notes应用程序开发的介绍.
Read this http://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/sg246854.html?OpenDocument as an introduction to classic Notes application development.
这篇关于如何通过Lotus Script在domino Designer中将表单值保存到DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!