有人请帮忙。我想在我的脚本块上使用“requestID”javascript 变量并将其用于我的 sql 查询。但是当我这样做时,它不起作用。
requestID= aReqId[iSelReq];
<%
Dim sqlQuery
Dim sqlQuery2
Dim sRecords
Dim sRecords2
Dim iVersion1
Dim iFieldSeqId2
Dim vValue
Dim iNumofReqTypes
Dim iLoop
for iLoop=0 to iNumofReqTypes
sqlQuery = "SELECT iVersion, iFieldSeqId FROM tblUsrAcntFieldsDtlMst, tblReqTypeMst WHERE tblReqTypeMst.ireqTypeID = tblUsrAcntFieldsDtlMst.iSysid and iSysID = '509' and iversion = (select max(iVersion) from tblUsrAcntFieldsDtlMst where iSysID = '509') and cReqDisable = 'N' order by iFieldSeqId,ixCoordinate, iYCoordinate"
sRecords = getRecords(sqlQuery,bResult)
if bResult then
iVersion1 = sRecords(0,iLoop)
iFieldSeqId2 = sRecords(1,iLoop)
end if
sqlQuery2 = "select vValues from tblNewUsrAcntReqDtlTxn where iReqID = " & requestID &" and iSysID = " & SysID &" and iVersion = " & iVersion & " and iFieldSeqID = " & iFieldSeqId & ""
bResult = false
sRecords2 = getRecords(sqlQuery2,bResult)
if bResult then
vValue = sRecords2(0,0)
end if
next
%>