Run-Time Error -2147467259 : Subquery returned more than 1 value

On some code written by someone else and a stored procedure written by yet another person, I am getting run-time error -2147467259 that says "Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."

<code removed per request http:Q_21903646.html>

If I run the SP in Query Analyzer, it returns one row with two columns (each column header says "(no column name)", not sure if that matters):

0 | NULL

Who is Participating?

Have you checked what DPI_ProcessStat stored procedure is doing. This is probably where the error is occurring as the EXEC statement is trying to assing the result of DPI_ProcessStat into variable @RC but if DPI_ProcessStat is returning more than one value then an error will occur.

HTH :)
GivenRandyAuthor Commented:
It must have to do with the VB6 debugging / timing. In one application, it fails about half the time. In another, it fails every time. Both call the same class (that calls the stored procedure) with nearly identical data.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.