Click here to Skip to main content
11,496,146 members (609 online)
Click here to Skip to main content

Stored Procedure Class Wizard (SPCW)

, 8 May 2001 122.5K 3K 49
A tool to generate class files to implement stored procedures
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
  • Download executable - 265 Kb
  • Download source - 103 Kb
  • <!-- Article Starts -->

    Description

    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).

    History

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

    License

    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

    Share

    About the Author

    George Poulose

    United States United States
    No Biography provided

    Comments and Discussions

     
    QuestionGreat Work Pin
    vaibhavbvp30-Jun-13 19:15
    membervaibhavbvp30-Jun-13 19:15 
    GeneralThanks Pin
    n1k025-Mar-09 22:15
    membern1k025-Mar-09 22:15 
    GeneralThank you!! Pin
    e_pech22-Apr-08 10:37
    membere_pech22-Apr-08 10:37 
    GeneralThanks! Pin
    PhilWelch18-Oct-07 5:46
    memberPhilWelch18-Oct-07 5:46 
    QuestionHow to set input parameter to stored proc? Pin
    bag_18-Mar-07 10:17
    memberbag_18-Mar-07 10:17 
    GeneralProblem in giving alias Pin
    Naresh200724-Feb-07 2:35
    memberNaresh200724-Feb-07 2:35 
    QuestionHaving a couple of issues Pin
    conacher1-Jan-06 15:40
    memberconacher1-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 */
    AS

    /*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
    BEGIN
    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
    RETURN(@ErrorNo)
    END

    IF @lDoctorPatientCount <> 0
    BEGIN
    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
    RETURN(@ErrorNo)
    END



    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
    ELSE
    BEGIN
    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
    END

    SELECT @lReturnCode = @ErrorFlag
    RETURN(@ErrorNo)
    GO


    Thanks for any and all responses.
    GeneralYou're the Man !! Pin
    WREY2-Oct-04 9:58
    memberWREY2-Oct-04 9:58 
    GeneralRetrieve data with stored procedure on C#.Net Pin
    ASP .Net17-Jun-04 1:18
    sussASP .Net17-Jun-04 1:18 
    GeneralThanks Pin
    maxiberta23-Sep-03 11:14
    membermaxiberta23-Sep-03 11:14 
    Generalnice tools Pin
    saad salman17-Jun-03 21:40
    membersaad salman17-Jun-03 21:40 
    GeneralI love you Pin
    mikeperetz29-Mar-03 5:25
    membermikeperetz29-Mar-03 5:25 
    QuestionHow to open and use. Pin
    prashmit4-Mar-03 2:49
    memberprashmit4-Mar-03 2:49 
    AnswerRe: How to open and use. Pin
    kbajan17-Feb-05 7:27
    memberkbajan17-Feb-05 7:27 
    AnswerRe: How to open and use. Pin
    daleboy7-Oct-05 22:54
    sussdaleboy7-Oct-05 22:54 
    GeneralThanks a lot Pin
    jack Mesic13-Apr-02 17:50
    memberjack Mesic13-Apr-02 17:50 
    GeneralThank you Pin
    Anonymous1-May-01 10:38
    memberAnonymous1-May-01 10:38 
    GeneralCLongBinary parameters are not supported. Pin
    Scott13-Dec-00 17:00
    memberScott13-Dec-00 17:00 
    QuestionHow can I use this nice class generator for getting input or/and output parameters? Pin
    Tesic Goran13-Dec-00 1:57
    memberTesic Goran13-Dec-00 1:57 
    Generalnewby thanks you, this is awesome Pin
    Scott Wood11-Nov-00 15:32
    memberScott Wood11-Nov-00 15:32 
    GeneralVery nice tool Pin
    FlyingFox8-Jun-00 17:45
    sussFlyingFox8-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
    Web04 | 2.8.150520.1 | Last Updated 9 May 2001
    Article Copyright 1999 by George Poulose
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid