End Function
''/// <summary>
''/// 执行Recordset
''/// </summary>
''/// <param name="connString">连接字符</param>
''/// <param name="cmdText">sql命令</param>
''/// <returns>RS</returns>
Public Function Recordset(connString,cmdText)
Dim objConn,objRS
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open connString
Set objRS = Server.CreateObject("ADODB.RecordSet")
objRS.Open cmdText,objConn,1,3
Set Recordset = objRS
End Function
Private Sub Class_Initialize()
CONN_STRING = "provider = microsoft.jet.oledb.4.0;data source=" & Server.Mappath("db.mdb")
End Sub
End Class
%>
ajax.js
复制代码 代码如下:
var http_request = false;
function makeRequest(obj,url) {
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType(''text/xml'');
}
} else if (window.ActiveXObject) { // IE
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert(''Giving up :( Cannot create an XMLHTTP instance'');
return false;
}
http_request.onreadystatechange = function()
{
if (http_request.readyState == 4) {
if (http_reque