A
Alberto
I have this store procedure to insert orders in the 'Orders' table of
NorthWind (SQL Server 2000):
CREATE PROCEDURE NuevoPedido
(
@CustomerID nchar(5),
@EmployeeID int,
@OrderDate DateTime,
@RequiredDate DateTime,
@ShipVia int,
@Freight money,
@ShipName nvarchar(40),
@ShipAddress nvarchar(60),
@ShipCity nvarchar(15),
@ShipRegion nvarchar(15),
@ShipPostalCode nvarchar(10),
@ShipCountry nvarchar(15),
@OrderID int OUTPUT
)
as
INSERT INTO Orders
(CustomerID, EmployeeID, OrderDate, RequiredDate, ShipVia, Freight,
ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry)
VALUES
(@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShipVia, @Freight,
@ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode,
@ShipCountry)
SELECT @OrderID = @@Identity
When I call it from C# I see an error who says 'Sintax error near
NuevoPedido'.
I can't find the error. Could you help me? Thank you.
NorthWind (SQL Server 2000):
CREATE PROCEDURE NuevoPedido
(
@CustomerID nchar(5),
@EmployeeID int,
@OrderDate DateTime,
@RequiredDate DateTime,
@ShipVia int,
@Freight money,
@ShipName nvarchar(40),
@ShipAddress nvarchar(60),
@ShipCity nvarchar(15),
@ShipRegion nvarchar(15),
@ShipPostalCode nvarchar(10),
@ShipCountry nvarchar(15),
@OrderID int OUTPUT
)
as
INSERT INTO Orders
(CustomerID, EmployeeID, OrderDate, RequiredDate, ShipVia, Freight,
ShipName, ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry)
VALUES
(@CustomerID, @EmployeeID, @OrderDate, @RequiredDate, @ShipVia, @Freight,
@ShipName, @ShipAddress, @ShipCity, @ShipRegion, @ShipPostalCode,
@ShipCountry)
SELECT @OrderID = @@Identity
When I call it from C# I see an error who says 'Sintax error near
NuevoPedido'.
I can't find the error. Could you help me? Thank you.