在Lotus開發(fā)中使用ODBC進行數(shù)據(jù)交互

          Sub Initialize  Dim session As New NotesSession  Dim doc As NotesDocument     '當前文檔的后臺文檔  Dim tobeSearchDb As NotesDatabase   '待搜索的數(shù)據(jù)庫  Dim DstDocs As NotesDocumentCollection  '搜索結(jié)果集  Dim RstDoc As NotesDocument                '查詢到的文檔  Dim sRstView As NotesView                    '結(jié)果顯示視圖  Set Db=Session.CurrentDatabase   Set doc=session.DocumentContext    Dim con As ODBCConnection  Dim userName As String  Dim password As String  Dim qry As ODBCQuery  Dim result As ODBCResultSet  Dim A As String    Set con = New ODBCConnection  Set qry = New ODBCQuery  Set result = New ODBCResultSet    Set qry.Connection = con  Set result.Query = qry    A=con.ConnectTo("CoprYW","sa","123")    qry.SQL = " INSERT INTO mt(phone,msg_content,sm_flag)  VALUES ('"+doc.SMSendTo(0)+"','"+doc.SMBody(0)+"','1'); "    'Call JSAction("Alert",Cstr(a))  If Not result.Execute Then   'Messagebox _   'result.GetExtendedErrorMessage,, result.GetErrorMessage      'Exit Sub  End If  result.Close(DB_CLOSE)  con.Disconnect   End Sub

          posted on 2010-04-09 09:32 明高 閱讀(284) 評論(0)  編輯  收藏 所屬分類: Lotus

          <2010年4月>
          28293031123
          45678910
          11121314151617
          18192021222324
          2526272829301
          2345678

          導航

          統(tǒng)計

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 沅江市| 大竹县| 桦川县| 青海省| 湘潭县| 济源市| 汽车| 五河县| 丹阳市| 堆龙德庆县| 阿鲁科尔沁旗| 新密市| 交城县| 开平市| 疏附县| 太仆寺旗| 罗定市| 奎屯市| 梅州市| 武鸣县| 龙岩市| 临沂市| 仁化县| 南江县| 上思县| 易门县| 光山县| 郧西县| 睢宁县| 嵊州市| 抚远县| 博乐市| 永城市| 宁夏| 赤壁市| 塘沽区| 文登市| 柞水县| 阿尔山市| 武穴市| 正蓝旗|