lotus notes 开发常用方法[9]

[入库:2005年8月19日] [更新:2007年3月24日]

本文简介:选择自 washing2000 的 blog

odbcresultset。通常做法为:

set con = new odbcconnection

dim dbqry as new odbcquery

dim dbresult as new odbcresultset

ret=con.connectto(dbsourcename,dbusername,dbpass)

if con.isconnected=false then

ret1=msgbox("数据库无法连接,请洽系统管理员",48,"提示信息")

odbc_insert=-2

exit function

end if

 

dbqry.sql="select * from thistable where thistable.id=thisid"

set dbqry.connection = con

set dbresult.query=dbqry

dbresult.execute

%rem

通过dbresult访问关系数据库:取值、更新数据库

%end rem

status=dbresult.close(db_commit)

ret=con.disconnect

 

b 通过odbcresultset更新数据(插入、删除、修改),可以有两种方式。一种方式如上例,对odbcqry.sql赋为查询语句,然后能过





odbcresultset
类的addrowupdaterowdeleterow setvalue等方法更新关系型数据库。如下例,对thistable增加一笔记录,并赋字符串型





本文关键:lotus notes 开发常用方法
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top