G
Guest
I am trying to code an compile a stored procedure without success. So I
generated one using Microsoft Visule C# .Net. and it follows. One of the
problems is that it will not compile. Some of the message won't to put ';'
all over the place, I some need help!!! These are some of the compile
messages.
; expected
Cannot use more than one type in a for, using, fixed, or declaration
statement
= (cannot specify constructor arguments in declaration)
Identifier expected
Invalid expression term ')'
Invalid expression term ','
static void SubmitChangesViaDataAdapter()
{
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'InsertCommandDetail' AND
user_name(uid) = 'dbo')
DROP PROCEDURE [dbo].[InsertCommandDetail];
GO
CREATE PROCEDURE [dbo].[InsertCommandDetail]
{
@Param1 int,
@Param2 char(30),
@Param3 money,
@Param4 money,
@Param5 money,
@filler char(50)
}
AS
SET NOCOUNT OFF;
INSERT INTO services([service-code], [service-description],
[large-animal-cost], [medium-animal-cost], [small-animal-cost]) VALUES
(@Param1, @Param2, @Param3, @Param4, @Param5, @filler);
SELECT [service-code], [service-description], [large-animal-cost],
[medium-animal-cost], [small-animal-cost], [service-nbr] FROM services WHERE
([service-nbr] = @@IDENTITY) ORDER BY [service-code];
GO
}
generated one using Microsoft Visule C# .Net. and it follows. One of the
problems is that it will not compile. Some of the message won't to put ';'
all over the place, I some need help!!! These are some of the compile
messages.
; expected
Cannot use more than one type in a for, using, fixed, or declaration
statement
= (cannot specify constructor arguments in declaration)
Identifier expected
Invalid expression term ')'
Invalid expression term ','
static void SubmitChangesViaDataAdapter()
{
IF EXISTS (SELECT * FROM sysobjects WHERE name = 'InsertCommandDetail' AND
user_name(uid) = 'dbo')
DROP PROCEDURE [dbo].[InsertCommandDetail];
GO
CREATE PROCEDURE [dbo].[InsertCommandDetail]
{
@Param1 int,
@Param2 char(30),
@Param3 money,
@Param4 money,
@Param5 money,
@filler char(50)
}
AS
SET NOCOUNT OFF;
INSERT INTO services([service-code], [service-description],
[large-animal-cost], [medium-animal-cost], [small-animal-cost]) VALUES
(@Param1, @Param2, @Param3, @Param4, @Param5, @filler);
SELECT [service-code], [service-description], [large-animal-cost],
[medium-animal-cost], [small-animal-cost], [service-nbr] FROM services WHERE
([service-nbr] = @@IDENTITY) ORDER BY [service-code];
GO
}