views:

60

answers:

0

Possible Duplicate:
Synchronize data between .dbf files and Sql Server 2005

I have a legacy application written in Delphi and having .dbf files. I have to recreate some part of that application in ASP.NET using SQL Server 2005. I have to sync both databases as user will access Delphi application as well as ASP.NET application.

.dbf files and SQL Server will be on the same server or LAN as ASP.NET application.So there wont be any issue in accessing .dbf files in ASP.NET.

The approach which i thought is as follows:-

1) Whenever data is inserted from asp.net application, I will insert it in SQL Server as well as.dbf files. So nothing to synchronize here.For the first time i have to populate my SQL Server tables from .dbf data.

2) How to do it the other way. If something changes in .dbf files,how to make those changes in SQL Server 2005.One approach is that i will have a column name in my new tables in SQL Server which stores last modified date of .dbf file. After certain interval i will check whether date modified of file and date stored in database are same. If they are not same i will import all dbf data in SQL Server.

3) Also, I can create a windows service that does this task of merging data from .dbf files to SQL Server 2005.

I am a novice user in this case. I donot know the repercussions of following it this way. Please suggest some other doable approaches or ways in which this can be accomplished. Also what are the pros and cons if i follow the above mentioned approach.