EXEC " & procedureName

LYekelchik2007 used Ask the Experts™
I have this script code in Lotus notes
sqlString = "EXEC " & procedureName$ & "'LeadUID'"
      qry.SQL = sqlString
      If result.IsResultSetAvailable Then
            If result.NumRows = DB_ROWSUNKNOWN Then
                  rows$ = "Not determined yet"
                  rows$ = Cstr(result.NumRows)
            End If
            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    
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I use this function

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.GetExtendedErrorMessage & "  " &  con.GetError & " " & con.GetErrorMessage
   Print "connected"
  End If
  Goto TheEnd
 End If
      '----- Log the number of records found
 Exit Function
 GetNumResults = 0
 Resume TheEnd
End Function


sorry .. Need to use Store Procedure
sqlString = "EXEC " & procedureName$ & "'LeadUID'" .. That why .. I can use it .. but need use it

You don't specify which version of Notes you are using.  But here are a few examples:


For 4.6 and R5:

You could also try the execProcedure method of the ODBCResultClass.
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

First off, LSXODBS is deprecated.  You should really be using the Lotus COnnector classes instead (*lsxlc).

If yo inist tho... Marilyn's last comment is key -- the driver cn get confused by additional info returned by a TSQL EXEC call if you don't tell it that you are using SP.  That's what execProcedure is for.

In addition, certain datatypes confuse the older driver.  You might try grabbing the TSQL of the SP, breaking it down, and seeing what happens when you call the various pieces. You should be able to at leats experiment with this in dev, even if the SQL prod security requires that everything be done via SP.

Cleanup rules allow the cleanup expert to assign self points?
If the cleanup rules don't allow an expert to self assign points from time to time then that is really a bad deal for people who do that work.  The question really should be does marilyng take advantage of that to enrich herself and if you look at the evidence the answer is a real resounding no.

Hey, wasn't accusing, just wondering.

Marilyn, why did split onto me?  I thought you were gong with you and behenderson?
The split is fine with me.. I know that you were not trying to grab the points, that clearly was not your intent.  I also know that you add insight and expertise to this forum so it is good that they did go to you.  call it serendipity, which is nice when it happens.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial