然后我在每个程序开头加上了<!--#include file="conn.asp"--> 里面其他的都没改 <% set oconn=server.CreateObject("adodb.connection") oconn.open "driver={aqlserver}; server=bluestation;uid=sa;pwd=intelligent;databass=jwc;" dim ors set ors=server.CreateObject("adodb.recordset") ors.open "selsct * from student where stuid='"&username&"'" if ors.eof or ors.bof then response.write "用户名错误" response.end else dim orstemp set orstemp=server.CreateObject("adodb.recordset") orstemp.open "selsct * from temp where id='"&username&"'",oconn,1,2,3 if orstemp.eof or orstemp.bof then orstemp("id")=username orstemp("servernum")=servernum orstemp("ip")=ip orstemp.update else orstemp("servernum").value=servernum orstemp("ip").value=ip orstemp.update end if orstemp.close set orstemp=nothing dim grade dim oRsselect dim oRsid dim studentclassid dim courseselect dim oRscourse set oRsid=server.createobject("adodb.recordset") set oRsselect=server.createobject("adodb.recordset") set oRscourse=server.createobject("adodb.recordset") grade=cint(mid(username,1,2)) oRsid.open "select classid,name,couseinfo from student where stuid='"&username&"'",oconn,1 dim m dim g(15) for i=1 to 16 g(m-1)=mid(oRsid("courseinfo"),m,1 next studentclassid=orsid("classid") oRsselect.open "select * from class where classid="&studentclassid&" and grade='"&grade"'",oconn,1 courseselect=oRsselect("classid") oRscourse.open "select id,coursename,teachername,VoteNum from vote where classid='"&courseselect&"'",oconn,1 oRscourse.movefirst end if %> 这样能够直接运行吗?
请教ASP+数据库问题~急
我照书上做了个网站~~~~~数据库是用的SQL~这个库怎么放到我申请的空间里运行啊
还有我想把SQL的数据库换成用ACCESS~
写了个conn.asp
<%
dim conn
set conn=server.createobject("adodb.connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &Server.MapPath("member.mdb")
conn.Open connstr
%>