Solved

Ado having new changes

Posted on 2000-03-19
9
172 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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
 

Accepted Solution

by:
mr_dj earned 100 total points
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:papaioannoug
Comment Utility
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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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
Comment Utility
Try using Requery method on your recordset
0
 
LVL 142

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now