I am new to Infopath 2003, SQL server 2000 and SQL server 2003. I am calling up a stored procedure with 2 variables from jscript in infopath 2003 to run a stored procedure in SQL server 2003 to copy a record (@RecipetoCopy) and insert it with a new name(@RecipeNew ). It works fine with SQL 2003 but it will not work in SQL 2000. Below is my stored procedure for both.
Code for 2005 work fine:
_______________ _______________ _______________ _____________
set ANSI_NULLS ON
set QUOTED_IDENTIFI ER ON
go
CREATE PROCEDURE [dbo].[CopyInsert]@RecipetoCopy varchar(10), @RecipeNew varchar(10)
AS
INSERT INTO [Epmar].[dbo].[Formulas]
([FormulaNumber],[Type1],[RawMat1],[Preset1],[Message1])
SELECT @RecipeNew,Type 1,RawMat1,Prese t1,Message1
from Formulas
where Formulas.Formul aNumber = @RecipetoCopy
SELECT * from Formulas
where Formulas.Formul aNumber = @RecipeNew
_______________ _______________ _______________ _______________
Code for SQL 2000 does not work
_______________ _______________ _______________ _______________
CREATE PROCEDURE CopyInsert @RecipetoCopy varchar(10), @RecipeNew varchar(10)
AS
INSERT Formulas
([FormulaNumber],[Type1],[RawMat1],[Preset1],[Message1])
SELECT @RecipeNew,Type 1,RawMat1,Prese t1,Message1
from Formulas
where Formulas.Formul aNumber = @RecipetoCopy
SELECT * from Formulas
where Formulas.Formul aNumber = @RecipeNew
GO
_______________ _______________ _______________ ____________
Code for 2005 work fine:
_______________ _______________ _______________ _____________
set ANSI_NULLS ON
set QUOTED_IDENTIFI ER ON
go
CREATE PROCEDURE [dbo].[CopyInsert]@RecipetoCopy varchar(10), @RecipeNew varchar(10)
AS
INSERT INTO [Epmar].[dbo].[Formulas]
([FormulaNumber],[Type1],[RawMat1],[Preset1],[Message1])
SELECT @RecipeNew,Type 1,RawMat1,Prese t1,Message1
from Formulas
where Formulas.Formul aNumber = @RecipetoCopy
SELECT * from Formulas
where Formulas.Formul aNumber = @RecipeNew
_______________ _______________ _______________ _______________
Code for SQL 2000 does not work
_______________ _______________ _______________ _______________
CREATE PROCEDURE CopyInsert @RecipetoCopy varchar(10), @RecipeNew varchar(10)
AS
INSERT Formulas
([FormulaNumber],[Type1],[RawMat1],[Preset1],[Message1])
SELECT @RecipeNew,Type 1,RawMat1,Prese t1,Message1
from Formulas
where Formulas.Formul aNumber = @RecipetoCopy
SELECT * from Formulas
where Formulas.Formul aNumber = @RecipeNew
GO
_______________ _______________ _______________ ____________
Comment