看看完整的代码(可自行添加其它功能):
< %@ LANGUAGE = VBScript % >
< HTML >
< HEAD >
< META NAME="GENERATOR" Content="Microsoft Developer Studio" >
< META HTTP-EQUIV="Content-Type"content="text/html; charset=gb2312" >
< TITLE >25175 之SQL存储过程< /TITLE >
< /HEAD >
< %
On Error Resume Next
Dim oSQLServer
Set oSQLServer = CreateObject ("SQLOLE.SQLServer")
strServer = "dep"
strLogin = "sa"
strPwd = ""
oSQLServer.Connect strServer,strLogin,strPwd
% >
< BODY BGCOLOR=#ffffff >
< SELECT NAME="Database" >
' 数据库列表
< %
For Each SQLDB In oSQLServer.Databases
If Not SQLDB.SystemObject Then
Response.Write "< OPTION VALUE=""" & SQLDB.Name & """ >" & SQLDB.Name & " "
End If
Next
Set oSQLServer = Nothing
% >
< /SELECT >
< /BODY >
< /HTML >
没有评论:
发表评论