Hi @AgaveJoe ,
I would like to study - SignalR
Will come back for you
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm thinking to design page (Web Apps) with submit button do as following,
This is my table design in SQL Server
CREATE TABLE [dbo].[serverProcess_Job001](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Batch_Id] [uniqueidentifier] NULL,
[job_Name] [varchar](200) NULL,
[job_Status] [char](1) NULL,
[paramData] [varchar](500) NULL,
[paramDataNotes] [varchar](200) NULL,
[reportFileName] [varchar](200) NULL,
[CrtBy] [nvarchar](450) NULL,
[CrtDte] [datetime] NULL,
[UpdDte] [datetime] NULL,
[dtVersion] [timestamp] NULL,
CONSTRAINT [PK_serverProcess_Job001] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [serverProcess_Job001_UQ001] UNIQUE NONCLUSTERED
(
[Batch_Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[serverProcess_Job001] ADD CONSTRAINT [DF_serverProcess_Job001_job_Name] DEFAULT ('N/A') FOR [job_Name]
GO
ALTER TABLE [dbo].[serverProcess_Job001] ADD CONSTRAINT [DF_serverProcess_Job001_job_Status] DEFAULT ('S') FOR [job_Status]
GO
ALTER TABLE [dbo].[serverProcess_Job001] ADD CONSTRAINT [DF_serverProcess_Job001_paramData] DEFAULT ('N/A') FOR [paramData]
GO
ALTER TABLE [dbo].[serverProcess_Job001] ADD CONSTRAINT [DF_serverProcess_Job001_CrtBy] DEFAULT (N'N/A') FOR [CrtBy]
GO
ALTER TABLE [dbo].[serverProcess_Job001] ADD CONSTRAINT [DF_serverProcess_Job001_CrtDte] DEFAULT (getdate()) FOR [CrtDte]
GO
ALTER TABLE [dbo].[serverProcess_Job001] WITH CHECK ADD CONSTRAINT [CK_serverProcess_Job001_01] CHECK (([job_Status]='S' OR [job_Status]='F'))
GO
ALTER TABLE [dbo].[serverProcess_Job001] CHECK CONSTRAINT [CK_serverProcess_Job001_01]
GO
My sample data as following,
Do submit, and page wait. It because, Status = 'S'
Once Status = 'S' change into Status = 'F', then page redirect
There is another process in server (Windows Form), will change Status='S' into Status='F'
Is that possible ? If possible, I need help
Hi @Zhi Lv - MSFT ,
I'm in the build of SignalR. Will share
SqlDependency will provide query notofictaion which allow applications to be notified when data has changed.
Query Notifications in SQL Server
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/query-notifications-in-sql-server
ASP.NET SignalR enables server-side code to push content to clients instantly.
Overview of ASP.NET Core SignalR
https://learn.microsoft.com/en-us/aspnet/core/signalr/introduction?view=aspnetcore-6.0
Combination of SqlDependency and SignalR will probably gives you the funcionalities you want.
Sorry sample below is written in Japanese but hope codes are readable:
ASP.NET Core SqlDependency
http://surferonwww.info/BlogEngine/post/2022/01/01/use-of-sqldependency-in-aspnet-core-application.aspx