Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Data change

Name: Anonymous 2007-03-22 6:17 ID:zDtY+At1

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.

Name: Anonymous 2007-03-22 6:57 ID:bMzqrEzw

flat files > shitty sql server

Name: Anonymous 2007-03-22 7:46 ID:2Po7hv+Z

>>1
Move to MySQL

Name: Anonymous 2007-03-22 9:33 ID:zDtY+At1

>>3

STOP TROLLING

Name: Anonymous 2007-03-22 9:55 ID:vs/erxA6

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.

Name: Anonymous 2007-03-22 10:35 ID:klaVddiP

>>1
Regular polling after a fixed amount of time is probably your best option.
However it does seem that PostgreSQL might actually be able to do exactly what you want http://www.postgresql.org/docs/8.2/interactive/libpq-notify.html

Name: Anonymous 2007-03-22 16:33 ID:DgFp/PZf

ON INSERT/UPDATE triggers calling a function that sets a user variable, then poll by SELECT @variable which is not really a query

Name: Anonymous 2007-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.

Name: Anonymous 2007-03-22 19:56 ID:zcecjJmm

>>7

SCOPEFAIL

Name: Anonymous 2007-03-23 17:56 ID:TD/8rnAT

 三三三三三三三三[BAR   KUMAR]三三三三三三三三三三三
 _i^i__i^i_                  i^i ._i^i_ __, -―- 、___ _i^i_
 |*||*| ∩___∩    i^i _i^i_  | | |@ll|(_/,,,,   ,,,,   ヽ_) |@|
 |≡||≡|| ノ       ヽ  ([])|;□;|.(≡)|_| |●  ●   | |_|
 . 二二/  ●   ● | 二二( (二二二二 彡(_●_ )   ミ二二二
     |     ( _●_)  ミ    ) )    i二i__/` ''∪''  / ヽ
    彡、   |∪|  ノ ,G'フ=  ___(___ノ_/i  ` ー '"  iヽ |
     /     ヽノ  ヽ / /     | !       |       | | l
 ..──|ヽ ヽ___i二i ヽ./─;==i─Y────────(⌒)─
 ____.ヽ\____)ノ   └-┘ ┴             ̄
      |       i ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
  ̄ ̄ ̄ (ヽ   |_  \ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄∧ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
 :::::::::::::::::::||\  | / /:::::::::| ̄ ̄ ̄ ̄ ̄ ̄ ̄   ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
 :::::::::::::::::::||::::|  |\___):::::::::::::| I tell you, there are Microsoft fags
 :::::::::::::::::::||:::(  \:::::::::::::::::::::| even here. Hard times...
 :::::::::::::(   )\_):::::::::::::::::::|
                  ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄

Name: Anonymous 2009-02-25 7:27


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: Anonymous 2009-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.

Name: Sgt.Kabuశ꾁kiman꒒ 2012-05-28 23:33

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

Don't change these.
Name: Email:
Entire Thread Thread List