Page 1 of 1

Two App Write TO MySQL and Another Read FROM MySQL

Posted: Sat 27 Nov 2004 10:27
by nuntio2000
Hi,
I apologize for my few experience in databases.
I've a this scenario over TCP-IP
Two remote win apps write records in the same MySQL table.
Another win app, called Myservice, have to read the changes in the same table.
My problem is how to retraive periodically the rows changed in the same table from Myservice.
I know well how to use timers for polling but i don't know a quick way to retraive data from the same table only when there are new or modified data.
Please could you provide me some code to help me.
Thx,
Best Regards,
Nunzio[/code]

Re: Two App Write TO MySQL and Another Read FROM MySQL

Posted: Mon 29 Nov 2004 14:05
by Oleg
There are several solutions for your applied problem.
You can add lastmodified filed of timestamp type into your table and when you insert or modify data you should enter a current date into this field.
When your service must select updated data, it can do it by condition lastmodified > lastprocesstime, where lastprocesstime is a last time of starting your process.

TimeStamp

Posted: Thu 02 Dec 2004 14:30
by nuntio2000
I've setted a timestamp(20) Unique Not Null into a column in my table.
Now how can i set MySQLCommand to avoid update repetitions and get the lastet modified line?
Thx,
Nunzio