Extended Stored Procedures

Extended Stored Procedures

Post by Simon Ritchi » Thu, 15 Jan 1998 04:00:00

I'm developing a customised version of the xp_cmdshell SP (used in SQL Server 6.5)

Whats the trick to capturing the output as generated by a command that is exec'ed eg. if a command like "DIR *.*" is passed to the stored procedure, this is passed to CMD.exe (using the /C option) and executes in a command shell - how  can I trap the output (presumedly streamed to StdOut) so that I can pass the output back to the users workstation.

I would prefer not to pipe the output into a file then re--read the file and send it back - I want to pick up the output directly (for performance reasons)

Any hints or tips would be appreciated.

- Simon


1. output parameters stored procedures / extended stored procedures

I have a problem concerning the returning of stored
procedure output values in my C++ application using

When calling a stored procedure sp_A which on his turn
calls an extended stored procedure xp_X (i.e xp_sqlmaint)
the output parameters (and return value) of sp_A cannot be
achieved in the C++ application. No error is indicated,
the value in my GetParameter call just remains unchanged





When replacing the extended stored procedure by a 'normal'
stored procedure sp_B, everything works fine.
create sp_B
  return 1

Any idea or explination is wellcome.....

Henk Devolder

2. Changeto query for converting date format ??

3. Stored Procedures vs Extended Stored Procedures

4. CHANGETO query in OPAL - differences in result from an interactive query - suggestions for improvement wanted

5. Calling extended stored procedure from stored procedure

6. VB5 - ODBC - IDS

7. Calling stored proc from extended stored procedure

8. Tupple statistics function

9. Creation of extended stored procedures - versioning info

10. timeouts and extended stored procedures

11. Help, Named Pipe problem in extended stored procedure

12. Good extended stored procedure reference for VB

13. Reading Tables in Extended Stored Procedures -- help!