domino 连接 sql (代理)

domino  sql  crud 点击打开链接

1.引包。分别在服务器,和开发的客户端引入sql.jar  相同位置

 



2 .代码

%REM
	Agent MyDoingByUser
	Created 2014-2-20 by admin/gzsolartech
	Description: Comments for Agent
%END REM
Option Public
Option Declare

Sub Initialize
	
	Dim con As  variant
	Dim serverName As String
	Dim dbName As String
	Dim dbAdmin As String
	Dim dbPassword As String
	Dim conStr As String
	
	
	Set con = CreateObject("ADODB.Connection")‘创建连接对象
	serverName = "192.168.1.115"‘服务器IP
	dbName ="ce-linkOA"‘数据库名
	dbAdmin = "sa"
	dbPassword = "12345678"
	conStr="DRIVER={SQL Server};SERVER="+Trim(serverName)+";UID="+Trim(dbAdmin)+";PWD="+Trim(dbPassword)+";DATABASE="+Trim(dbName)+";"

	 
	con.Open(conStr)
	If con.State <> 1 Then
		MsgBox "connect the interrupt."
	Else
		MsgBox "connect is success."
	End If
	Call con.Disconnect()
End Sub


3.运行代理时, 设置以下属性

4.打开代理列表 运行代理


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。