Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Dynamic data display

Posted on 2003-03-04
8
Medium Priority
?
238 Views
Last Modified: 2013-11-13
Hi,
I am making a multi user application with a central database server. i am displaying some data on a visual basic form, now if another user updates some data on the database i want the changes to immediately show on the vb form. I was trying to do this using dynamic recordset, and i see that if someone insert a new row it is reflected in the recordset but there is no event in recordset which will tell me the someone has inserted new data or changed data.

How can i know in my application that someone have inserted or updated some data in the database so that i can refresh my VB form.
0
Comment
Question by:navneet77
  • 4
  • 2
  • 2
8 Comments
 

Expert Comment

by:tWiZtEr_RX
ID: 8068951
I dont think there is something as easy as an API dedicated to monitering it.
You can try a timer if you want.
0
 
LVL 2

Author Comment

by:navneet77
ID: 8068961
ya but i do not want to use timer, firstly the refresh will not be immediate and it will waste network resource.
0
 

Expert Comment

by:tWiZtEr_RX
ID: 8069143
use a 1 min. standard timer to refreshes every 60 secs.
and a refresh button.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:navneet77
ID: 8069218
ya but i do not want to use timer, firstly the refresh will not be immediate and it will waste network resource.
0
 
LVL 3

Accepted Solution

by:
redfordb earned 100 total points
ID: 8077956
I did something like this a while ago. It may not be the best way to do it, but it got around the problem...

1. Create a new table in the database.

2. Create a small app on the server side that monitors the database. This program will be a like a server that your app must be able to communicate with.

3. When you access data from the database, insert your conenction number into the new table (you must remove it when your data form is closed).

4. Set up a trigger on the database to fire off the new app when data changes.

5. The new app then reads the new table, and sends a signal off to each of the connections.

6. In your main program, when the refresh signal is received from the server app, you refresh your data.

Like I said it isnt the prettiest way to do it, but it works.



0
 
LVL 2

Author Comment

by:navneet77
ID: 8109018
hi redfordb

thanks for the reply.. i have some question
how will the program on the server communicate with the clients.
what do you mean by the connection number
and how will it signal off to each connection.
0
 
LVL 3

Expert Comment

by:redfordb
ID: 8109506
Look at the "Using the Winsock Control" in HELP.

Basically all you need to do is extend there example so that the server can accept multiple connections. Then when the data changes send some data to all the clients that are currently connected to the server. On the client side when the data arrives it triggers off an event. All you do is put the refresh routine in this event.

You dont even need to insert the connection number into a table. just make an array on the server side, scan through the array and sen the signal to each connection that appears in the array.
0
 
LVL 2

Author Comment

by:navneet77
ID: 8109657
Thanks for the help
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question