S
Steven Spits
Hi,
When I let a TableAdapter generate stored procedure for "SELECT * FROM
Supplier WHERE SupplierID = @SupplierID", it generates (some parts removed):
Select:
SET NOCOUNT ON;
SELECT * FROM Supplier WHERE SupplierID = @SupplierID
Update:
SET NOCOUNT OFF;
UPDATE [Supplier] SET <...> WHERE <...>;
SELECT SupplierID, <...> FROM Supplier WHERE (SupplierID = @SupplierID);
Insert:
SET NOCOUNT OFF;
INSERT INTO [Supplier] VALUES <...>;
SELECT SupplierID, <...> FROM Supplier WHERE (SupplierID = @SupplierID);
Delete:
SET NOCOUNT OFF;
DELETE FROM [Supplier] WHERE <...>;
My questions:
(1) Why does Visual Studio generate a SELECT after the INSERT & UPDATE
statements?
(2) Why is NOCOUNT set to ON in the select?
Kind regards,
Steven
- - -
When I let a TableAdapter generate stored procedure for "SELECT * FROM
Supplier WHERE SupplierID = @SupplierID", it generates (some parts removed):
Select:
SET NOCOUNT ON;
SELECT * FROM Supplier WHERE SupplierID = @SupplierID
Update:
SET NOCOUNT OFF;
UPDATE [Supplier] SET <...> WHERE <...>;
SELECT SupplierID, <...> FROM Supplier WHERE (SupplierID = @SupplierID);
Insert:
SET NOCOUNT OFF;
INSERT INTO [Supplier] VALUES <...>;
SELECT SupplierID, <...> FROM Supplier WHERE (SupplierID = @SupplierID);
Delete:
SET NOCOUNT OFF;
DELETE FROM [Supplier] WHERE <...>;
My questions:
(1) Why does Visual Studio generate a SELECT after the INSERT & UPDATE
statements?
(2) Why is NOCOUNT set to ON in the select?
Kind regards,
Steven
- - -