Get Dynamic SQL results from stored procedure 
Author Message
 Get Dynamic SQL results from stored procedure

I have a stored procedure (sql Server 7) which gets a record count.  I do
not know how to get this back to vb as a return value.  I simplified version
of what I would like to do follows:

create procedure GetCount
as



The vb would then call the procedure as follows:

count=getcount


return a count without using a recordset.  How can I do that?

Thanks much
Les Morganstein



Mon, 20 Jan 2003 03:00:00 GMT  
 Get Dynamic SQL results from stored procedure
Les

you probably have a good reason to construct your SQL string in code. Try
this:

create procedure GetCount
as


count(*) from myTable where Field1 = 6)"


drop procedure spTemp

Hope it helps

--
Dean Vitner, MCP

SPIN Informatica d.o.o. Osijek


Quote:
> I have a stored procedure (sql Server 7) which gets a record count.  I do
> not know how to get this back to vb as a return value.  I simplified
version
> of what I would like to do follows:

> create procedure GetCount
> as




> The vb would then call the procedure as follows:

> count=getcount


> return a count without using a recordset.  How can I do that?

> Thanks much
> Les Morganstein



Tue, 21 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Getting SQL SERVER Stored Procedure results from Visual Basic

2. Converting dynamic query by example SQL to RDO based SQL Stored Procedure

3. SQL query: from SELECT statement to stored procedure with dynamic PL/SQL

4. Problem getting result from a Stored Procedure

5. Getting both result sets into one recordset from a single stored procedure

6. Incomplete Results from SQL Stored Procedure

7. Help Retrieve Result From Store Procedure (SQL Server 2000)

8. ADO doesn't receive result of SQL query from a stored procedure

9. Getting a return value from a SQL Server stored procedure through VB

10. Getting a return value from a stored procedure in SQL Server

11. Getting row from SQL Server stored procedure

12. Results of Stored Procedure in Subform?

 

 
Powered by phpBB® Forum Software