i don't know much about Topspeed - but if they have anything like a "trigger" (and you can make a slight modification to the database) you could add an insert trigger to the "interesting" table and a small "insertlog" table (keyed on timestamp or something) - and then log interesting inserts to this insertlog
your monitor process could read stuff out of this table FIFO and delete the entries after it does whatever you need to do to each record. doing it this way would guarantee you do things in the "right" order and also avoid needing to scan the whole monster table looking for changes or counting records. -ns http://www.roserox.co.th ----- Original Message ----- From: "vss" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Friday, October 11, 2002 05:11 Subject: [DUG]: Whats going to be best thing to do? > Hi all. > > I have a client who has a Clarion databse (Topspeed dbs) and we have now > brought the TopSpeed ODBC driver, and can access the files. > > What we are trying ot do is when some data goes into a specific table, > it has to get that record, and do something with it. > > Whats going to be the best way to do this do you think? > My thoughts have been:- > > (1). do a record count and when the count is diff. go and get the new > record.....BUT what if 3 entries have been added...how do you know 3 > have been added? what about, you go to get the last record, but another > 2 have been added since you did the r/count....dont think this is an > option > > (2). SOMEHOW monitor the table so that as stuff is added do something. > > (3). Get the people who wrote the app. to make a mod that writes the > data to an identical table (structurally) and then r/count this. if its > >0 then it loop the records. > > #3 seems to me the best...just costly. > The other problem IS, that we are trying to makeit as quick as poss. as > the data is being posted onto a webpage, and at the moment usething the > method we are using not, its about 1-2 mins before the new appears. > > Anyone else got any other Ideas? > > Jeremy > > -------------------------------------------------------------------------- - > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > To UnSub, send email to: [EMAIL PROTECTED] > with body of "unsubscribe delphi" > Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/ > --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi" Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/