Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ado having new changes

Posted on 2000-03-19
9
Medium Priority
?
182 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
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

963 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