Example8 - Handling Procedure Output Parameters
Example8 illustrates DB Library support for output parameters in Microsoft® SQL Server™ stored procedures.
Default Location
C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\Example8
Running the Sample
- Open Example8.dsw in Microsoft Visual C++® 6.0.
- From the Tools menu, choose Options, and then click the Directories tab.
- From the Show directories for box, choose Include files and Library files, and ensure that the following directories (as appropriate) are included:
- Include files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Include
- Library files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Lib
- Include files: C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Include
- Ensure that the hard-coded server name, user name, and password are correct.
- Compile the program.
- Create the stored procedure, rpctest by running C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\Example8\Createsp.sql).
- Open a Command Prompt window, and then change the current directory to C:\Program Files\Microsoft SQL Server\80\Tools\Devtools\Samples\DBLib\Example8.
- Run the program by entering "example8".
Functions Illustrated
Dbinit | dbresults |
Dbmsghandle | dbprrow |
Dberrhandle | dbnumrets |
Dblogin | dbretname |
DBSETLUSER | dbrettype |
DBSETLPWD | dbprtype |
DBSETLAPP | dbretlen |
DBSETLVERSION | dbretdata |
Dbopen | dbhasretstat |
Dbrpcinit | dbretstatus |
Dbrpcparam | dbexit |
Dbrpcsend | DBDEAD |
Dbsqlok |