?
Solved

Ado having new changes

Posted on 2000-03-19
9
Medium Priority
?
181 Views
Last Modified: 2013-11-23
Problem:
I Have an SQL 7.0 table where data are changing every 2 sec. How can I show them into a VB control with ado with out refreshing it each time? Is Very impotent my control not to flash in every data changing. Is there any whey to leave ado open to continuously communicate with my control?
Please answer back.
0
Comment
Question by:papaioannoug
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2633451
I think that the data you are speaking of contains only a few data (otherwise don't do this)
Furthermore, there is no built-in way to do what you want to do.
Please give more details, I can give you my implementation strategy about such things.
0
 

Author Comment

by:papaioannoug
ID: 2633571
Comments:
I have in every record a field that have an amount of money. That field is changing.
The amounts of records in my table are about 400.
The Problem is how can I preview them from a grid with out refreshing the control or the ado because that is creating a lot of problems.

Problems:
1) Control is flashing.
2) Controls Scrollbar in every refresh is going back to the top.
3) No simple grids can be used because I have to use image in to the fields.
4) Delay in every ado refresh.


0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2633589
Maybe I do repeat myself, but:
DO NOT DO IT.
What you can do is, refresh the grid on user request (using a button), and indicating somewhere on the form, what time the last refresh has been done.
And if really you want to refresh your grid, you may do it, but the interval should be something like 5 minutes (yes, minutes). Think about network: If 10 Users would query your complete table every 2 seconds, this would mean you are transferring (400 rows/2 seconds) * 10 Users * ( [Size per row] bytes ) through the network.
Assuming row is 200 bytes (i don't even think of the image) this would mean:
40 KB per second only for the data. then add the overhead for the communication.
Finally, think that there are other people working on the network too...
Hope this brings you to the good way.
If your customer want's to have this feature, you need to explain him why YOU DON'T WANT TO DO THIS.




0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Accepted Solution

by:
mr_dj earned 200 total points
ID: 2634362
NO. But there are couple of ways to do this if you are familiar with TCP/IP sockets programming or MessageQueue Server programming. But these approches are not trivial, as well as what you are trying to do. The best scenerario would be to not to pull the information(query) from the server, rather use a push model that publish the changed information to the clients. The simplest form would be to write an update trigger that invokes/signal a program that will broadcast this information to clients(Using TCP/IP or Queues).
  Good luck
     DJ
0
 

Author Comment

by:papaioannoug
ID: 2635296
To ANGELIII:
Thank you for your time and your interest but it's a big customer and a big project and I’m not going to say no, to them. I’ll just explain to them the problem that may come.

To MR_DJ:
Can you please send me a sample code as an example to understand the concept of your proposal?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2635505
papaioannoug, even if it is a big customer, you will sometimes have to say no AND explaining why you say no.
I assure you that this part of the app will fail, even if approaching with MessageQueue or TCP/IP methods.
The method will reduce the amount of data to be transferred, but not necessary enough to take really advantage of it (i had such a failure, so be warned)
Best wishes for your project.
0
 
LVL 1

Expert Comment

by:phiro
ID: 2635638
My two cents here...
It might be done, by using UDP (Uniform Datagram Packets if memory serves <g> ) This is a connectionless protocol that works under the TCP protocol. It is quick and uses no validation on contents of connection at all.
These UDP packets with the changed data that will have to incoorporate themselves into a Grid on the client.
You'll need to:
-Take a normal grid, or build a grid yourself that can hold pictures
-Fill this with the startup information. (Now remember you cannot link the ADO rs to the grid, only the values)
-Have your clients set up with a winsock socket that listens to UDP packets.
-Have your server transmit changes by UDP and let the clients pick them up. and set them into the grid.

As you see, not a trivial matter, but one that works.


0
 
LVL 2

Expert Comment

by:sbmc
ID: 2651370
Try using Requery method on your recordset
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2652224
sbmc :
please read my second comment
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

719 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