我的ASP程序为什么只能在网络连接上后才能访问数据库,我的数据库是SQL server2000 请各位大侠帮帮忙啊
<%dimconndimconnstr,sysfilenamedimdbfile,Password,Username,LocalNamesysfilename=""dbf...
<% dim conn
dim connstr,sysfilename
dim dbfile ,Password,Username,LocalName
sysfilename=""
dbfile = "shiyanshi"
Password = ""
Username = "sa"
LocalName = "127.0.0.1"
set conn=Server.CreateObject("adodb.Connection")
Conn.Open "PROVIDER=SQLOLEDB.1;Data Source="&LocalName&";Initial Catalog="&dbfile&";Persist Security Info=True;User ID="&Username&";Password="&Password&";Connect Timeout=30"
sub CloseConn()
conn.close
set conn=nothing
end sub
%>
麻烦你了 展开
dim connstr,sysfilename
dim dbfile ,Password,Username,LocalName
sysfilename=""
dbfile = "shiyanshi"
Password = ""
Username = "sa"
LocalName = "127.0.0.1"
set conn=Server.CreateObject("adodb.Connection")
Conn.Open "PROVIDER=SQLOLEDB.1;Data Source="&LocalName&";Initial Catalog="&dbfile&";Persist Security Info=True;User ID="&Username&";Password="&Password&";Connect Timeout=30"
sub CloseConn()
conn.close
set conn=nothing
end sub
%>
麻烦你了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询