关于LotusScript ODBC的问题!急

qgfj 2008-04-02 01:12:04
Dim conn As New ODBCConnection
Dim qry As ODBCQuery
Dim result As ODBCResultSet
Call conn.Disconnect()
Set qry=New ODBCQuery
Set result=New ODBCResultSet
If conn.ConnectTo ("test",admin","ooooo") Then
Set qry.Connection=conn
qry.SQL="select a.ch_sort, a.ch_rem2 from iech00h a where a.dp_no='A11100'"
Set result.Query=qry
Call result.Execute()
If Not result.IsResultSetAvailable Then
Msgbox "没有数据!"
Else
Do
result.NextRow
doc.prno=result.GetValue("ch_sort")
(我想在这里再使用result.GetValue("ch_rem2")执行一个查询)可是之前的result不能被Close 应该怎么做啊 急啊 大哥哥们

doc.status="1"
doc.isChecked="1"

Call doc.save(True,True)

Loop Until result.IsEndOfData
End If
If(i>0)Then
Msgbox "更新了"+Cstr(i)+"条信息"
End If

result.Close(DB_CLOSE)
Call conn.Disconnect()'与数据源断开连接
Else
Print "Could not connect to server"
Msgbox "没有连接到数据库!"
End If
...全文
114 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
cnscns 2008-04-02
  • 打赏
  • 举报
回复
select a.ch_sort, b.el_po, b.el_date from iech00h a, iech00d b where a.dp_no='A11100' and b.el_rem = a.ch_rem2
qgfj 2008-04-02
  • 打赏
  • 举报
回复
兄弟 大哥 高手 老天
qgfj 2008-04-02
  • 打赏
  • 举报
回复
求高手帮忙 就是怎么在查询中再插入查询语句 嵌套着查的那个意思

qgfj 2008-04-02
  • 打赏
  • 举报
回复
想执行的语句是:
select el_po,el_date from iech00d where el_rem= result.GetValue("ch_rem2") ---
doc.el_po= result.GetValue("el_po")
doc.el_date= result.GetValue("el_date")


535

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 Exchange Server
社区管理员
  • 消息协作社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧