Solved

Ado having new changes

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

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
 

Accepted Solution

by:
mr_dj earned 100 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 142

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 142

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to debug this code 7 56
MS Date Picker 64 bit 32 bit issue 12 49
Protecting vb6 & .Net code Obfuscation 18 95
Excel file not created as expected 7 50
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

920 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

12 Experts available now in Live!

Get 1:1 Help Now