Results 1 to 6 of 6

Thread: NEW Multithreading demo. Database Table Monitor - FULL DEMO PROJECT

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Lightbulb 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
    Attached Files Attached Files

  2. #2

  3. #3
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    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.

  4. #4

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    Hmmmmmmmmm...
    If you click on Project...References...does it say any are missing?
    I have just wiped all DLL's and stuff from my machine and recompiled everything and it compiles fine for me...

    Does the MyThread project have a module called modFunctions in it?


    Woka

  5. #5
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343
    Ok that was it for most of the problems.
    MISSING VBTools2.dll and MISSING vbPropertyBagServer now seem to be permanent references in my compiler. Just had to remove the checkmarks and lead it to the right ones.


    But I did hit another snag when i tried to compile vbPropertyBagDemo

    I get "User defined type not defined" on line:
    Private WithEvents mobjUsers As Users



    !!!! Never mind i found it. I guess learing something like this is a bad idea when u have a bad case of insomnia going on *)
    Last edited by longwolf; Jan 21st, 2004 at 08:57 AM.

  6. #6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width