<%@语言=“ jscript” codepage =“ 936”%>
<scriptlanguage = vbscriptrunat =“ server”>
FunctionBytes2BSTR(VIN)
strreturn =“”
fori = 1TOLENB(VIN)
thischcode = ascb(midb(vin,i,1))
ifthischarcode <&h80
Strreturn = Strreturn&Chr(此charcode)
别的
NextCharCode = ASCB(MIDB(VIN,I+1,1))
strreturn = Strreturn&Chr(Clng(thisCharCode)*&H100+Cint(NextCharCode))
i = i+1
Endif
下一个
bytes2bstr = strreturn
最终功能
FunctionajaxRead(theurl)
DIMXMLHTTP
setxmlhttp = createObject(“ microsoft.xmlhttp”)
xmlhttp.open“ get”,theurl,false
xmlhttp.setRequestheader“ content-type”,“ text/html”
xmlhttp.send
dimhtmlstr
htmlstr = bytes2bstr(xmlhttp.Responsebody)
ajaxread = htmlstr
最终功能
</script>
<%
Varadoconn;
forctionOpendatabase(){
尝试{
adoconn = newActivexObject(“ adodb.connection”);
adoconn.open(“提供商= microsoft.jet.oledb.4.0; datasource =”+server.mappath(“ getCaiku.mdb”));
}捕获(e){
adoconn.close;
wress.write(“数据库连接出错,请检查连接字串。”);
响应。
}
}
功能closedatabase(){
adoconn.close;
}
响应buffer = 1;
Server.ScriptTimeOut = 99999;
//////////////////////////////////////////////////////////////////////////////////////
varbeginid = 230; //开始id
varendid = 500; //结束ID
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Vararr,TSTR,TID,GetData;
varcountid = 0;