Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

read table only when data changed?

Status
Not open for further replies.

AndyKeen

Programmer
Jul 10, 2003
25
0
0
GB
A very small part of my current app requires me to read an existing Access 97 table containing a single record and to display the contents of a field as soon as they are changed.

I have no control over how or when the data is placed into the Access table (it is a call logging output).

Currently I am using a timer in the vb.net app to refresh the dataset and then check if the data is changed before displaying if necessary. All I actually want to pass is a single telephone number of type string and relatively short length (up to 30 chars) to my app whenever it changes.

This is a small multi user system with the .net app potentially running concurrently on a number of PCs. Is there a sensible way to detect that the data is changed in the server based Access db table without diectly reading it and therefore creating constantly repeating server disc reads from each of the workstations?

I am able to add a routine into the Access db if necessary. So I suppose it could check itself on a loop or timer but I still can't work out how to pass the changed data to my .net app. It feels like I should create a message transmit/receive type situation shared between the two apps but I haven't a clue how or even where to start looking.

Does anybody have any ideas? Yours hopefully...
 
Yes I would create another application that all the other applications use to read and write to the access database it's called a DAL (dataaccesslayer) if you put the DAL on the server then all the users would go through that one application therefor the application know when the data is updates it can then send out a message via sockets or remoting to the clients to say that the data is updated. This sounds complicated and it can be complicated depending on the number of users.

I can't give you much code because I don't know your system.

Christiaan Baes
Belgium

"My old site" - Me
 
Thanks Christiaan. As I have no experience of either I guess this will be another good learning curve on a supposedly small app. There will never be more than 10 concurrent users. Which do you think would be the best/quickest method to read up on first? I don't want to make this into a bigger task than it needs to be as it really isn't an important part of the overall project however I don't like doing a poor job either!

Do you know if it is possible to relatively simply push data from within the Access db via VBA rather than having to have a separate vb.net app running which would still be reading every few seconds on the server. I suppose then I start getting deeper and deeper in - Life is never simple is it?

In essence all I want to do is pass one string, only if it has changed since the last push, potentially every few seconds from an Access db table row to a running vb app on a client machine. The main reason for this is to avoid constant reads from the w/s to the server.

Any further outline help you can give would be appreciated but thanks anyway for the pointers so far.
 
The database should not do this for you. I think going with the timer thing is better and quicker to implement for you so I would go with that.

The only database that I know of that does what you want is oracle. And they don't recommend it for high usage.

A database is only for storing and retrieving data. A database should not do what you want you want it to do. That is for another tier/layer/application.

Christiaan Baes
Belgium

"My old site" - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top