bug in CSLAStoredProcedure.cstbug in CSLAStoredProcedure.cst
Old forum URL: forums.lhotka.net/forums/t/1073.aspx
Skafa posted on Wednesday, August 30, 2006
I found a small bug when generating some stored procs:
CREATE PROCEDURE [dbo].[AddProduct]
@leverancierID uniqueidentifier,
@artikelNummer varchar(50),
@leverancierArtikelNummer varchar(50),
@levertijd int,
@naam varchar(255),
@omschrijving text,
@magazijnCode varchar(50),
@inkoopPrijs money,
@verkoopPrijs money,
@korting money,
@verpakkingID uniqueidentifier,
@artikelGroepID uniqueidentifier,
@DATE_CREATED datetime,
@DATE_MODIFIED datetime,
@voorraadBijhouden tinyint,
@basisVoorraad int,
@minimaalInMagazijn int,
@maximaalInMagazijn int,
@aantalInMagazijnVoorBesteladvies int,
@minimumBestelAantal int,
@aantalInMagazijn int,
@aantalGereserveerd int,
@aantalBijLeverancier int,
@NewproductID uniqueidentifier OUTPUT
AS
SET NOCOUNT ON
SET @NewproductID = NEWID()
INSERT INTO [dbo].[tblProduct] (
[productID],
[leverancierID],
[artikelNummer],
[leverancierArtikelNummer],
[levertijd],
[naam],
[omschrijving],
[magazijnCode],
[inkoopPrijs],
[verkoopPrijs],
[korting],
[verpakkingID],
[artikelGroepID],
[DATE_CREATED],
[DATE_MODIFIED],
[voorraadBijhouden],
[basisVoorraad],
[minimaalInMagazijn],
[maximaalInMagazijn],
[aantalInMagazijnVoorBesteladvies],
[minimumBestelAantal],
[aantalInMagazijn],
[aantalGereserveerd],
[aantalBijLeverancier]
) VALUES (
@productID,
@leverancierID,
@artikelNummer,
@leverancierArtikelNummer,
@levertijd,
@naam,
@omschrijving,
@magazijnCode,
@inkoopPrijs,
@verkoopPrijs,
@korting,
@verpakkingID,
@artikelGroepID,
@DATE_CREATED,
@DATE_MODIFIED,
@voorraadBijhouden,
@basisVoorraad,
@minimaalInMagazijn,
@maximaalInMagazijn,
@aantalInMagazijnVoorBesteladvies,
@minimumBestelAantal,
@aantalInMagazijn,
@aantalGereserveerd,
@aantalBijLeverancier
)
shouldn't @productID (in VALUES) not be @NewproductID ?
Jaans replied on Thursday, September 07, 2006
Hi Skafa
Well spotted!
You're right, that is a bug. I've made the correction and I'll send JT the new template with that fix.
Thanks
Jaans
JTWebMan replied on Thursday, September 07, 2006
I added it to source control for you.
JT
Copyright (c) Marimer LLC