Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Procedure running in Query Analyser not thru, ADO

Author  Topic 

Rajeswari
Starting Member

20 Posts

Posted - 2001-11-20 : 04:21:08
I am Using 2 Stored procedures A and B and about 8 tables.
In Stored Procedure A, i am calling Stored procedure B. Stored Procedure B returns about 300000 records to stored procedure where i copy to flat file. I set query time out, connection time out to zero, still successive statements after the call to stored procedure B is not executing.

If i run it from query analyser, it's working properly, but not through ADO(Visual Basic).

Stored Procedure A:
Create Procedure A
As
declare @command varchar(1000)
begin
set @command = 'bcp "EXEC B" queryout \\path -c -u test -p test'
exec xp_cmdshell @command

set @command = 'bcp "Select * from Table1" queryout \\path -c -u test -p test'
exec xp_cmdshell @command

set @command = 'bcp "Select * from Table2" queryout \\path -c -u test -p test'
exec xp_cmdshell @command

end

Stored Procedure B:
Create Procedure B
As
--This table contain about 300000 records
select * from table4


From Visual Basic I set command timeout and Connection time out to zero.
   

- Advertisement -