turbot_yu
asked on
Cannot hit the if condition by function's return value
If CheckTSTrend(temptimeStart , recid) = True Then
'Get data and upload
GetTrendData pqdifLogicalObj, pRecordObserv, TrendData
End If
Cannot get to the GetTrendData, though CheckTSTrend is true
The function is as below,
MyRs.Open strSQL, cn
If Not MyRs.EOF Then
If CStr(timeStart) > MyRs(0) Then
CheckTSEvent = True
Else
CheckTSEvent = False
End If
End If
' cmd.Execute
cn.CommitTrans
cn.Close
End Function
'Get data and upload
GetTrendData pqdifLogicalObj, pRecordObserv, TrendData
End If
Cannot get to the GetTrendData, though CheckTSTrend is true
The function is as below,
MyRs.Open strSQL, cn
If Not MyRs.EOF Then
If CStr(timeStart) > MyRs(0) Then
CheckTSEvent = True
Else
CheckTSEvent = False
End If
End If
' cmd.Execute
cn.CommitTrans
cn.Close
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.