Dear,
Can any one help on this?
I am getting error (3021) Either BOF or EOF is True, or the current record has been deleted in WFR script while executing below code.
If pWorkdoc.Fields("BudgetCenter").Text <> "" Then
Project.LogScriptMessageEx(CDRTypeInfo, CDRSeverityLogFileOnly, "xxVATandMajorFieldVAlidate - budgetCenter" & budgetCenter & "!!")
majorOffice = pWorkdoc.Fields("MajorOffice").Text
budgetCenter = pWorkdoc.Fields("BudgetCenter").Text
mySQL = "SELECT BUDGET_CENTER" & _
" FROM XX_OFR_VALID_VAT_COMB_V" & _
" where MO = '"& majorOffice &"'" & _
" and BUDGET_CENTER = '"& budgetCenter &"'"
Set myRecordSet1 = myConnection.Execute(mySQL)
resultVal= myRecordSet1.RecordCount
rvalue = myRecordSet1.Fields("BUDGET_CENTER").Value
Project.LogScriptMessageEx(CDRTypeInfo, CDRSeverityLogFileOnly, "xxVATandMajorFieldVAlidate BudgetCenter(UI)=" & pWorkdoc.Fields("BudgetCenter").Text & ":**" )
Project.LogScriptMessageEx(CDRTypeInfo, CDRSeverityLogFileOnly, "xxVATandMajorFieldVAlidate rvalue(DB)=" & rvalue & ":**" )
If myRecordSet1.EOF Then
pWorkdoc.Fields("BudgetCenter").Valid = False
pWorkdoc.Fields("BudgetCenter").ErrorDescription = DicVal("187", "ERR")
Else
pWorkdoc.Fields("BudgetCenter").Valid = True
pWorkdoc.Fields("BudgetCenter").ErrorDescription = ""
End If
End If
Thanks,
Rajeev