[提问]
建立新网站后的数据库放置问题和数据库的连接路径问题
|
|
建立新网站后的数据库放置问题和数据库的连接路径问题
我已经成功的空间根目录上创建了个123文件夹,并在后台吧123文件夹绑定了个新的域名www.123.com,新的域名解析成功,123文件夹下也放了个一个新的网站系统,现在问题是:通过www.123.com 能访问到首页,但是登陆时好像无法连接到ACC数据库。。。。请问大家这个要怎么养放?
我现在是吧新的站的ACC数据库放到,网站根下专门放ACC数据库的那个文件家下面的,conn.asp连接的地址要怎么写了?
谢谢大家解答!! |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2008-4-23 11:20:05
|
显示全部楼层
access路径问题
看对你可有帮助,这是个例子<%
Dim oConn, oRs
Dim qry, connectstr, sDSNDir
Dim db_name, db_username, db_userpassword
Dim db_server, dsn_name
dsn_name = "your_dsn_name"
fieldname = "your_fieldname"
tablename = "your_tablename"
sDSNDir = Server.MapPath("_dsn")
connectstr = "filedsn=" & sDSNDir & "/" & dsn_name
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename
Set oRS = oConn.Execute(qry)
if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & " "
oRS.movenext
wend
oRS.close
end if
Set oRs = nothing
Set oConn = nothing
%> |
|
|
|
|
|
|
|
|
|
|
mancat0828
发表于 2008-4-23 11:47:47
|
显示全部楼层
补充:
我用的动易的开源asp系统
空间的根目录上已经放了套系统一切正常,
我想多建个网站,就加了个目录并绑好了域名,放个单独的index.html,新的域名也能解析到新建的网站所在文件夹下,但是再把一套动易开源系统放到新的网站的文件夹下面后,我就不知道新的站的数据库要怎么弄了? |
|
|
|
|
|
|
|
|
|
|
大漠孤狼
发表于 2008-4-23 15:54:23
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
mancat0828
发表于 2008-4-24 15:04:04
|
显示全部楼层
|
|
|
|
|
|
|
|