Microsoft KB Archive/194669

= How To Retrieve Extended Stored Procedures from SQL Server =

Article ID: 194669

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0b for Macintosh
 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q194669



SUMMARY
This article shows how to use the stored procedure sp_helpextendedproc to return information about extended stored procedures when accessing date available from SQL Server.



MORE INFORMATION
The sp_helpextendedproc stored procedure returns a cursor with information regarding currently defined extended stored procedures and the name of the dynamic link library to which the procedure belongs.

The columns returned by sp_helpextendedproc are: Column name         Description ---         ---

NAME                Name of the stored procedure DLL                 Dynamic link library to which the stored procedure in                     the NAME column belongs.   Create a program file called "SP_PROCS.PRG" using the following code making sure that the user has the correct permissions: * Substitute the server name #DEFINE Connect_String 'DRIVER={SQL Server};SERVER=MY_SERVER;' + ; 'DATABASE=PUBS;UID=UserName;PWD=StrongPassword' * Connect to SQL Server gnConnHandle=SQLSTRINGCONN(Connect_String) IF gnConnHandle>0 * Create a command to execute the stored procedure SQLCommand="sp_helpextendedproc" * Execute the stored procedure and return data to a cursor testvar=SQLEXEC(gnConnHandle,SQLCommand,'SYS_Procs') ? testvar * Select the cursor SELECT SYS_Procs BROWSE LAST =SQLDISCONN(gnConnHandle) ENDIF CLOSE ALL RETURN  From the Command window, type "DO SP_PROCS."

