I'd like to set up a mechanism whereby my client programs are notified when data has changed in the SQL server so they can update their displays.
I don't want to poll regularly as that means a lot of unnecessary queries. Ideally I'd like the SQL Server to send something down the existing connection to notify just after the data has changed. Is there a way to have a query block until an event happens, like an SQL equivalent to the Win32 API's WaitForMultipleObjects?
Any ideas? I am using Microsoft's SQL Server 2000.
I have no idea, but I might actually make an effort to read the documentation if you tell me what API your client programs are using to speak with the server.
ON INSERT/UPDATE triggers calling a function that sets a user variable, then poll by SELECT @variable which is not really a query
Name:
Anonymous2007-03-22 17:40 ID:9SmWRI21
On PostgreSQL you could use LISTEN and NOTIFY. Also ON INSERT/ON UPDATE triggers, or AFTER INSERT (etc) rules combined with a regularly maintained (i.e. to remove old rows) table indexed by timestamp, so you can query for changes quickly. That means that you still have to do semi-regular polling, but at least the poll will only affect a relatively small and therefore very cacheable table, assuming the things you need change notifications on are many, and queries that fit into an index are quick.
Semi-regular polling but at least the poll will only affect a relatively small and therefore very cacheable table assuming the things you need change notifications on are many many ways to fit in context so modifiable loved by everyone the very moment it was posted god dammit it blows my fucking mind Seriously guys HAX MY ANUS fucking.
Name:
Anonymous2009-03-06 8:04
The only thing they can do is something like this and it sounds very childish to me Just write one string such as buttons i getText equals Occupied.
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy