Click here to Skip to main content
Click here to Skip to main content

Stored Procedure Class Wizard (SPCW)

, 8 May 2001
Rate this:
Please Sign up or sign in to vote.
A tool to generate class files to implement stored procedures
  • Download executable - 265 Kb
  • Download source - 103 Kb
  • <!-- Article Starts -->


    Stored Procedure Class Wizard (SPCW) is a development tool that can be used exclusively to generate class files (.cpp and .h) derived from MFC’s CRecordset for stored procedures. Currently SPCW supports Microsoft SQL Server 7.0/6.5, and Sybase SQL Anywhere 5.5 and can be extended to any database. The idea is to speed up the development process of client-server projects involving aforementioned packages under Windows NT/9x. SPCW is an extension to Microsoft Visual Studio's class wizard.

    Running the application:

    Extract it to a <\temp> folder and then run.

    System Requirements:

    Microsoft Visual C++ 5.0 (and above), Windows NT 4.0/9x (using the latest service packs is highly recommended).


    9 April 2001 - Fixed data trunctation problem and Output params buffer now released correctly (Justin Kirby)


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    George Poulose

    United States United States
    No Biography provided

    Comments and Discussions

    QuestionGreat Work Pinmembervaibhavbvp30-Jun-13 19:15 
    GeneralThanks Pinmembern1k025-Mar-09 22:15 
    GeneralThank you!! Pinmembere_pech22-Apr-08 10:37 
    GeneralThanks! PinmemberPhilWelch18-Oct-07 5:46 
    QuestionHow to set input parameter to stored proc? Pinmemberbag_18-Mar-07 10:17 
    GeneralProblem in giving alias PinmemberNaresh200724-Feb-07 2:35 
    QuestionHaving a couple of issues Pinmemberconacher1-Jan-06 15:40 
    I have used this package to create a bunch of classes, but a couple of my stored procedures simply won't work.
    I receive the following error message when I try to create a class for the SP appearing below the error.
    Any suggestions from anyone would be appreciated. (Maybe there is an updated version?)
    Error message:
    Expected error 16 from application Stored Procedure Class Wizard............
    Stored Procedure
    CREATE PROCEDURE dbo.procDeleteDoctorInformation
    @lReturnCode int OUTPUT, /* Return Code Value */
    @lDoctorIDNumber int OUTPUT, /* Doctor Identifier */
    @lDoctorPatientCount int OUTPUT /* Doctor Patient Counter */
    /*sp_Audit_Agent Setup Begin */
    DECLARE @ErrorNo int
    ,@Procedure_Name varchar(30)
    ,@ErrorFlag int
    ,@ErrorMsg varchar(255)
    ,@RowCount int
    /* Set the procedure name in the variable. */
    SELECT @Procedure_Name = OBJECT_NAME (@@PROCID)
    /* Set the @ErrorFlag variable to -1 as the default return value. */
    SELECT @ErrorFlag = -1
    /*sp_Audit_Agent Setup End*/
    SELECT @lDoctorPatientCount = COUNT(Clinic.dbo.tblPatientBiographical.lPatientIDNumber)
    FROM Clinic.dbo.tblPatientBiographical
    WHERE tblPatientBiographical.lDoctorIDNumber = @lDoctorIDNumber

    SELECT @ErrorNo = @@ERROR, @RowCount = @@ROWCOUNT
    IF @ErrorNo <> 0
    Select @ErrorMsg = 'SELECT Error,procDeleteDoctorInformation'
    EXEC sp_Audit_Agent @UnexpectedError = 0, @Code = 16, @Text = @ErrorMsg, @Component = 'StoredProcedure', @Module = @Procedure_Name
    RAISERROR('Cannot retrieve the Patient Count for the Doctor.',16,1)
    SELECT @lReturnCode = -1
    IF @lDoctorPatientCount <> 0
    Select @ErrorMsg = 'SELECT Error,procDeleteDoctorInformation'
    EXEC sp_Audit_Agent @UnexpectedError = 0, @Code = 16, @Text = @ErrorMsg, @Component = 'StoredProcedure', @Module = @Procedure_Name
    RAISERROR('The Patient Count for this Doctor is NOT Zero, so we cannot delete.',16,1)
    SELECT @lReturnCode = -2

    DELETE FROM Clinic.dbo.tblDoctor
    WHERE tblDoctor.lDoctorIDNumber = @lDoctorIDNumber;

    SELECT @ErrorNo = @@ERROR, @RowCount = @@ROWCOUNT
    /* PRINT 'After DELETE Based on Doctor ID @ErrorNo = ' + ltrim(str(@ErrorNo)) + ' @RowCount = ' + ltrim(str(@RowCount)) */
    IF @RowCount > 0
    SELECT @ErrorFlag = 0
    Select @ErrorMsg = 'SELECT Error,procDeleteDoctorInformation'
    EXEC sp_Audit_Agent @UnexpectedError = 0, @Code = 16, @Text = @ErrorMsg, @Component = 'StoredProcedure', @Module = @Procedure_Name
    RAISERROR('Cannot Delete the Doctor Information.',16,1)
    SELECT @ErrorFlag = -3
    SELECT @lReturnCode = @ErrorFlag

    Thanks for any and all responses.
    GeneralYou're the Man !! PinmemberWREY2-Oct-04 9:58 
    GeneralRetrieve data with stored procedure on C#.Net PinsussASP .Net17-Jun-04 1:18 
    GeneralThanks Pinmembermaxiberta23-Sep-03 11:14 
    Generalnice tools Pinmembersaad salman17-Jun-03 21:40 
    GeneralI love you Pinmembermikeperetz29-Mar-03 5:25 
    QuestionHow to open and use. Pinmemberprashmit4-Mar-03 2:49 
    AnswerRe: How to open and use. Pinmemberkbajan17-Feb-05 7:27 
    AnswerRe: How to open and use. Pinsussdaleboy7-Oct-05 22:54 
    GeneralThanks a lot Pinmemberjack Mesic13-Apr-02 17:50 
    GeneralThank you PinmemberAnonymous1-May-01 10:38 
    GeneralCLongBinary parameters are not supported. PinmemberScott13-Dec-00 17:00 
    QuestionHow can I use this nice class generator for getting input or/and output parameters? PinmemberTesic Goran13-Dec-00 1:57 
    Generalnewby thanks you, this is awesome PinmemberScott Wood11-Nov-00 15:32 
    GeneralVery nice tool PinsussFlyingFox8-Jun-00 17:45 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web01 | 2.8.150326.1 | Last Updated 9 May 2001
    Article Copyright 1999 by George Poulose
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid