This is the continuation of question:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/ASP/Q_23095904.html?cid=239#a20698760It is a two part question.
I have the following function
Function FillCboRecordSetAssetTypes
(selectNam
e,fieldNam
e)
dim sCBO
RecordSetAssetTypes.MoveFi
rst
do while not RecordSetAssetTypes.EOF
sCBO = sCBO & "<option value='" & RecordSetAssetTypes.Fields
(fieldName
).Value & "'"
IF Request(selectName) = RecordSetAssetTypes.Fields
(fieldName
).Value Then
sCBO = sCBO & " selected='selected'"
End If
sCBO = SCBO & ">" & RecordSetAssetTypes.Fields
(fieldName
).Value & "</option>"
RecordSetAssetTypes.MoveNe
xt
loop
FillCboRecordSetAssetTypes
= sCBO
End Function
This populates cboMainCategory perfectly.
<select id='cboMainCategory' name='cboMainCategory' class='RegularDropDown' style='width:50px;'><%=Fil
lCboRecord
SetAssetTy
pes("cboMa
inCategory
","MACHINE
_CATEGORY_
ID")%></se
lect>
I need to use the main select of the following stored procedure execution:
Set oStoredProcInterface = New cStoredProcInterface
Set oConn = server.CreateObject("ADODB
.Connectio
n"):oConn.
Open session("ConnectionString"
)
redim ParameterArray(5,0)
Call oStoredProcInterface.Inser
tParamInAr
ray(Parame
terArray, "PCCOMPANYID", adChar , adParamInput, 2, "MS")
set oRs = oStoredProcInterface.Execu
teStoredPr
oc (oConn, Application("JTExtrusion20
Prefix") & ".PKG_SETTINGS.GETLOOKUPSE
TTINGS", ParameterArray)
oRs contains the appropriate values.
I need to get oRs.Fields ("MACHINE_DOWNTIME_OPERATI
ON_ID")
and set that in the above fuction. So what I think is this. Pass another value in the function.
and then modify the selected value of the combo box. Can someone help me modify the below function.
I would appreciate it.
Function FillCboRecordSetAssetTypes
(selectNam
e,fieldNam
e, oRs.Fields ("MACHINE_DOWNTIME_OPERATI
ON_ID"))
dim sCBO
RecordSetAssetTypes.MoveFi
rst
do while not RecordSetAssetTypes.EOF
sCBO = sCBO & "<option value='" & RecordSetAssetTypes.Fields
(fieldName
).Value & "'"
IF Request(selectName) = RecordSetAssetTypes.Fields
(fieldName
).Value Then
sCBO = sCBO & " selected='selected'"
End If
sCBO = SCBO & ">" & RecordSetAssetTypes.Fields
(fieldName
).Value & "</option>"
RecordSetAssetTypes.MoveNe
xt
loop
FillCboRecordSetAssetTypes
= sCBO
End Function
Start Free Trial