• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 543
  • Last Modified:

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

Ideas?
0
GivenRandy
Asked:
GivenRandy
1 Solution
 
cubixSoftwareCommented:
Hi

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 :)
0
 
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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now