open visual studio –> File menu –>New –>Website
Create a database in sql server named “SmartUserData”, and create a table “UserMsk” in newly created sql database.
- Create UserMsk Table
ID (PK, int, not null)
Username (nvarchar(50), null)
UserType (nvarchar(50), null)
Address (nvarchar(50), null)
ProducedEnergy (nvarchar(50), null)
ConsumedEnergy (nvarchar(50), null)
- Create Procedure
USE [SmartUserData]
GO
/****** Object: StoredProcedure [dbo].[USERMSK_SELECT] Script Date: 7.08.2022 16:13:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[USERMSK_SELECT]
@Username AS NVARCHAR(256),
@Usertype AS NVARCHAR(256),
@Address AS NVARCHAR(256),
@ProducedEnergy AS NVARCHAR(256),
@ConsumedEnergy AS NVARCHAR(256)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT * FROM UserMsk
END