1 Attachment(s)
NEW Multithreading demo. Database Table Monitor - FULL DEMO PROJECT
OK...some of you may have seen the file searching multithreading example I wrote. If so, then this project will be a little easier to understand.
This project is a 3-tier DB application that uses property bags to communicate between tiers.
Basically the the application creates a seperate thread that "monitors" a table for any changes. If there are any changes made then the thread sends the new data back to the main data objects, which in turn populates a grid.
The beauty of this is that the monitoring project runs in it's own thread and thus can monitor a table without affecting the performance of your client user interface.
Included in this ZIP are 6 projects
- vbTools2
- vbPropertyBagServer
- vbPropertyBagObjects
- vbPropertyBagDemo
- DB Monitor Thread
- DB Monitor Thread Proxy
Dependancies:
DB Monitor Thread references vbPropertyBagServer and vbTools2
DB Monitor Thread Proxy references vbTools2
vbPropertyBagObjects references vbPropertyBagServer and DB Monitor Thread Proxy
vbPropertyBagDemo references vbPropertyBagObjects
The access database needs to be located in C:\Database, although you can change this location in the modDatabase module in the vbPropertyBagServer project.
OK...to get this up and running compile the projects, making sure you have set the relevant references, in the following order:
- vbTools2
- vbPropertyBagServer
- VB Monitor Thread
- VB Monitor Thread Proxy
- vbPropertyBagObjects
- vbPropertyBagDemo
Now run vbPropertyBagDemo...and hopefully, if you have done things correctly it will all work.
If you launch 2 EXE's then you can test the DB Monitor and watch the listview update automatically.
The DB Monitor displays it's form, that shows you any errors that may occur. This if purely for debugging purposes and the .Show command is not required for the app to work.
If you have any questions then give me a shout.
Regards,
Wokawidget
Compile Error: Can't find project or library
I'm tring to follow yor steps in order, but when i get to : VB Monitor Thread
I get- Compile Error: Can't find project or library
in:
Private Sub StartMonitoring(ByVal plngMemAddr As Long)
Line:
RaiseEvent StartMonitoring(Trim$(udtProps.Table), udtProps.Interval)
I gave it the references to:
VBTools2.dll and vbPropertyBagServer.dll
But it didn't help.