Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 10, 2012 07:53 AM by Mikesdotnetting
Nov 09, 2012 08:44 AM|LINK
We have a legacy database which provides access to it using ODBC (read only). We are developing an extension to the application using ASP.NET C# and SQL server as database. We have written a Windows service which runs frequently (every 10 minutes) to import
data from few tables into SQL server database. Although this is working, we believe this is not an efficient way and data may be out of sync for potentially 10 minutes.
We are new to C# and .NET development so I was wondering if there is a way for the windows service to know that a new record is created in the source database so that we can also create in the SQL server database. The source database does not provide database
Nov 10, 2012 01:30 AM|LINK
if there is a way for the windows service to know that a new record is created in the source database so that we can also create in the SQL server database.
As far as I see, I think a better way for you at present is to watch when to create a new record and then continue to create a new database.
So you can use an Insert Trigger to cope with that problem.
For more about Trigger, you can see this：
Nov 10, 2012 07:11 AM|LINK
Thank you for quick response.
The problem is that the source database is not SQL server and it does not provide insert trigger facility. Sevice broker and notification services would have been ideal for this use but I can't find any example of using across multiple databases (i.e. non
SQL and SQL).
Nov 10, 2012 07:13 AM|LINK
The problem is that the source database is not SQL server and it does not provide insert trigger facility.
What kind of db are you now using？
Nov 10, 2012 07:35 AM|LINK
The database is a Kerridge (KCML), used by car dealers. This is a legacy database however provides ODBC access.
Nov 10, 2012 07:53 AM|LINK
Unless your Kerridge database provides some kind of mechnism to issue notifications, or you can perhaps detect changes through some kind of file watcher, there is not much that can be done. In any event, this is not a problem that can be solved through ASP.NET.