April 27, 2002 at 10:58 am
hi,
I am using Sql server 7.0.When i insert or update a record in a table,i need to
show a message in the front end ,that one record is added to the table.
I have written the queries for insertion and updation into the table in a storedprocdure.
Is there any way to return something from a storedprodure ,so that i can show a
message in the frontend, that a record is updated by someone..the updation will be
done in one machine(clerk's machine in bank) and the message should be shown in another machine(manger's machine in bank) who has more administrative power on the system.
does 'alert' in sql server help this.
Delphi is my frontend.
help
paul
April 27, 2002 at 1:58 pm
Your choices are to use a trigger or polling. With a trigger you could send the notification directly, or add a row (or more) to a table and have the client app poll the table periodically. Or you could just poll the main table directly to look for rows above a certain id, greater than last date checked, etc. I would think adding rows to a table would make more sense, since you probably need to keep a history of who did what anyway, maybe display that in a grid in the power users app and just refresh it periodically or something. They probably won't want a message box popping everytime something happens.
Andy
April 28, 2002 at 2:04 am
Create a table called Messages and everytime insert records into messages table with the username/userlevel who should be allowed to see that message. Then in your frontend you can create a form or a systray util which will check for records into the Messages table say every 3 mins and can pickup the records from the Messages table which have to be displayed. You can very well give the user the functionality to mark the record old/archive so that the user does not get the same message again.
quote:
hi,I am using Sql server 7.0.When i insert or update a record in a table,i need to
show a message in the front end ,that one record is added to the table.
I have written the queries for insertion and updation into the table in a storedprocdure.
Is there any way to return something from a storedprodure ,so that i can show a
message in the frontend, that a record is updated by someone..the updation will be
done in one machine(clerk's machine in bank) and the message should be shown in another machine(manger's machine in bank) who has more administrative power on the system.
does 'alert' in sql server help this.
Delphi is my frontend.
help
paul
Paras Shah
Evision Technologies
Mumbai, India
Paras Shah
Evision Technologies
Mumbai, India
April 30, 2002 at 10:26 am
Creating a temp monitor table and poll this table at regular intervals (say every 30 sec) from my front end using a timer control.
Give me a fish, you feed me for a day! Teach me to fish, you feed me for a life time.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply