Passing SQL trigger to C# code behind page
-
Hello, Is there any way to transfer a sql trigger to C# code behind page? Thanks every body. Mehedi Hasan
-
Hello, Is there any way to transfer a sql trigger to C# code behind page? Thanks every body. Mehedi Hasan
-
Ok, I'm discussing the scenario. An external application will insert data in a table in sql server. My application(written in c#) have to pull the data immediately from db and process. But my application does not know when the external application will insert data. So is there any way to notify my application at the time external application insert data in db? Well, one solution may be using a thread which will continously monitor the table. But there may be thousands of row will insert in the table within a second. So I want to use an insert trigger and notify my application but don't know how? Will u help me? Thanks. Mehedi Hasan
-
Ok, I'm discussing the scenario. An external application will insert data in a table in sql server. My application(written in c#) have to pull the data immediately from db and process. But my application does not know when the external application will insert data. So is there any way to notify my application at the time external application insert data in db? Well, one solution may be using a thread which will continously monitor the table. But there may be thousands of row will insert in the table within a second. So I want to use an insert trigger and notify my application but don't know how? Will u help me? Thanks. Mehedi Hasan
You can't use ASP.NET to monitor something like that, unless you can make the database send a web request to the web server, as an ASP.NET page is only running when responding to a request. Of course you can't do that directly from the datbase, but you could construct a program that sends a web request, and call that program from the database. You could also set up a flag; a field in a table that you set to a certain value whenever there is new data to process, and have a process running in the background that is polling the flag continously (e.g. every x seconds), and starts the job whenever there is new data. --- b { font-weight: normal; }
-
You can't use ASP.NET to monitor something like that, unless you can make the database send a web request to the web server, as an ASP.NET page is only running when responding to a request. Of course you can't do that directly from the datbase, but you could construct a program that sends a web request, and call that program from the database. You could also set up a flag; a field in a table that you set to a certain value whenever there is new data to process, and have a process running in the background that is polling the flag continously (e.g. every x seconds), and starts the job whenever there is new data. --- b { font-weight: normal; }
Dear Guffa, Thanks for ur response. Actually I'm not interested in second solution (polling every x seconds). I want to develop a desktop program to process the data but I don't know how to call the program from database. Please help me regarding this. Mehedi Hasan