Two App Write TO MySQL and Another Read FROM MySQL

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
nuntio2000
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

Two App Write TO MySQL and Another Read FROM MySQL

Post by nuntio2000 » Sat 27 Nov 2004 10:27

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]

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

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

Post by Oleg » Mon 29 Nov 2004 14:05

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.

nuntio2000
Posts: 19
Joined: Fri 19 Nov 2004 18:51
Location: South Italy

TimeStamp

Post by nuntio2000 » Thu 02 Dec 2004 14:30

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

Post Reply