|
我会用以下的code来connect database,
---------------------------
<%@ Import Namespace="System.Data.SqlClient" %>
<Script Runat="Server">
Sub Page_Load
Dim conNorthwind As SqlConnection
conNorthwind=NewSqlConnection("Server=localhost;uid=sa;pwd=secret;database= Northwind" )
conPubs. Open ()
End Sub
</Script>
-----------------------------
如果我要用DNS来connect, 是如何写?
你们也是用 Import Namespace 吗?
还是用Interface Click 来connect? 如图
|
|