web.config
〈appSettings〉
〈add key="cnEForm" value="server=xx.xx.xx.xx;uid=xx;Password=xx;database=xx"/〉
〈add key="cnEForm1" value="server=xx.xx.xx.xx;uid=xx;Password=xx;database=xx"/〉
〈add key="cnEForm2" value="server=xx.xx.xx.xx;uid=xx;Password=xx;database=xx"/〉
〈/appSettings〉
----程式內使用方式
Public EFormCommand As SqlCommand = New SqlCommand
Dim strConn As String = ConfigurationSettings.AppSettings("cnEForm")
Dim EFormConn = New SqlConnection(strConn)
Public AccReader As SqlDataReader
strSQL = "select BANAME,MailId,JodeCode from person..BAPERSON where baidno=" & MyFunctions.qo(IDNO)
EFormCommand = New SqlCommand(strSQL, EFormConn)
EFormConn.Open()
沒有留言:
張貼留言