Share via


Using the Wizard to Create an Extended Stored Procedure

Feature Only in Enterprise Editions   Using the Extended Stored Procedure Wizard to create an extended stored procedure is supported only in Visual C++ Enterprise Editions. For more information, see .

You can use the Extended Stored Procedure wizard to generate a Win32 DLL project, with the proper initialization code, that contains one exported function. The wizard will also include the header file (srv.h) and library (opends60.lib) needed for using ODS. The one function that is created includes code for a sample program, utilizing ODS.

To create an extended stored procedure

  1. Choose New from the File menu.

  2. Click the Projects tab.

  3. Select Extended Stored Procedure AppWizard from the list of project types.

  4. Assign a name to the project and click OK.

  5. In Step 1, the wizard will prompt you for a name for your procedure. This name will be assigned to an exported Win32 function. Extended stored procedure names commonly begin with xp_.

    After assigning a name to your extended stored procedure click OK. The wizard will generate project files:

    proc.cpp   The exported Win32 function, which is the extended stored procedure.

    projname.dsp   The Visual C++ project file.

    projname.cpp   A file that includes DLL initialization code.

    StdAfx.h   An include file for standard system include files, or project-specific include files that are used frequently.

    StdAfx.cpp   A source file that includes just the standard includes.

Compiling the generated project will generate a DLL, projname.DLL.