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

Stored procedure won't return to VB

VB 6.0; SQL Server 2000

A stored procedure runs perfectly well from SQL Query Analyzer. However, from VB, it won't return anything. If I comment the SQL totally from stored procedure and replace it with 'hello', it returns 'hello' to VB. The parameters are OK.
0
caracalla
Asked:
caracalla
  • 2
1 Solution
 
flavoCommented:
Can we see some code?  VB and T-SQL would be handy

Dave
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I assume all you need to do is to add the following line to the procedure:

CREATE PROCEDURE yourproc
AS
SET NOCOUNT ON       --- add this line
... here comes the rest of your proc code
0
 
caracallaAuthor Commented:
found it: SET NOCOUNT ON


There were 2 sets of select statements.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>There were 2 sets of select statements.

if you have 2 different select statements, you have to use the ADO's Recordset method .NextRecordset which returns the second (next) recordset

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

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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