问题是这段代码太固定了。我不会把它改成SQL的,,老出错。。
<%
function OpenDB(sdbname)
{
var connstr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath(sdbname);
var conn = Server.CreateObject("ADODB.Connection");
conn.Open(connstr);
return conn;
}
var sResult = new Array();
var oConn = OpenDB("data.mdb");
var sql = "select num1,num2 from nums order by id";
var rs = oConn.Execute(sql);
while(!rs.EOF)
{
sResult[sResult.length] = rs("num1").Value + "@@@" + rs("num2").Value
rs.MoveNext();
}
Response.Write(escape(sResult.join("###")));