关于动态连接数据库的问题
代码是这样的<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/instrument_and_equipment.asp" -->
<%
var kemu = Session("MM_kemu");
kemustring = "MM_"+kemu+"_STRING";
Response.Write(kemustring)
var MM_rs = Server.CreateObject("ADODB.Recordset");
MM_rs.ActiveConnection = kemustring;
MM_rs.Source = "SELECT top 10 FROM first_chapter where id=rand() union all SELECT top 10 FROM second_chapter where id =rand() union all SELECT top 10 FROM third_chapter where id=rand() union all SELECT top 10 FROM forth_chapter where id=rand()";
MM_rs.CursorType = 0;
MM_rs.CursorLocation = 2;
MM_rs.LockType = 1;
MM_rs.Open();
var numrows = Session("MM_kemu")+"_numRows";
numrows = 0;
%>
<%
var Repeat1__numRows = 20;
var Repeat1__index = 0;
numrows += Repeat1__numRows;
%>
想做一个在线考试系统,根据前面的选择科目和每一章考试的题目数量动态的连接不同的数据库(现在我在试,只用了一个数据库),可是这段代码一直通不过去,请高手指定,谢谢!