Dim connectstring As String
Dim sr As New System.IO.StreamReader( Server.MapPath("") + "\connect.txt")
If File.Exists(ServerPath) Then
connectstring =sr.ReadLine()
End If
Dim connectstring As String
Dim objstream As StreamReader
Dim ServerPath As String
ServerPath = Server.MapPath("") + "\connect.txt" '得到数据库连接串文本文件
If File.Exists(ServerPath) Then
objstream = File.OpenText(ServerPath)
connectstring = objstream.ReadLine()