第一個:dbo權限列出服務器上所有數據庫
<%
Dim srv
Dim objDB
Set srv = Server.CreateObject("SQLDMO.SQLServer")
srv.LoginTimeout = 15
srv.Connect "127.0.0.1", "lcx", "lcx"
Set objDB = Server.CreateObject("SQLDMO.Database")
%>
<SELECT name="fdatabase">
<%
For Each objDB In srv.Databases
If objDB.SystemObject = False Then
%>
<OPTION><%=objDB.Name%></OPTION>
<%
End If
Next
%>