I have this script code in Lotus notes
sqlString = "EXEC " & procedureName$ & "'LeadUID'"
qry.SQL = sqlString
result.Execute
If result.IsResultSetAvailable Then
If result.NumRows = DB_ROWSUNKNOWN Then
rows$ = "Not determined yet"
Else
rows$ = Cstr(result.NumRows)
End If
Else
Messagebox "Result set not available",, "No result set"
End If
The Line "If result.IsResultSetAvailable" give me a Messagebox "Result set not available",, "No result set"
So I am able to execuate this line from SQL "EXEC " & procedureName$ & "'LeadUID'" and get result ..So need return Integer form Column"2" .. Where my problem
Function GetNumResults(dataResults As ODBCResultSet ) As Long
' This function looks at and ODBCresultset and returns the number of records in the result
On Error Goto ErrorTime
Dim status As Long ' For checking ODBC status
GetNumResults = 0
If (dataResults Is Nothing) Then Goto TheEnd
'----- Count the number of records in the result set
Call dataResults.LastRow
GetNumResults = dataResults.CurrentRow
If (dataResults.NumRows = DB_ROWSUNKNOWN And GetNumResults > 0) Then
GetNumResults = 0
status = dataResults.GetError
If status <> DBstsSUCCESS Then
Print con.GetExtendedErrorMessag
Else
Print "connected"
End If
Goto TheEnd
End If
'----- Log the number of records found
TheEnd:
Exit Function
ErrorTime:
GetNumResults = 0
Resume TheEnd
End Function