tags:

views:

64

answers:

1

Exe made in vb6 will hang if its continously run on server? This exe has winsock component which is used to received data from biometric readers and saved in sql server 2005. Actually this shows real time list for acceess made on biometric readers means in this exe we have used datagrid component which display saved records in sql. How to refresh this exe and data.?

A: 

Well, if you're displaying a GUI then I'd say technically you are not running on a server. But I still don't see how doing this will make the program "hang."

There are some things to be careful of when it comes to VB6 memory leaks. One thing to be sure to do is make sure you use the SP6 version of the VB6 runtime and "extended runtime" (the set of controls that ship with VB6). The other is probably to go over the code and look for circular object references that may result in accumulated orphaned objects over time. There were also a few obscure ADO memory leaks that never got fixed until MDAC 2.7, but most of those don't impact a VB6 program.

I suspect there are other causes of hangs, but most of those are probably faulty logic such as loops containing DoEvents calls. Using Winsock for TCP without a full understanding could also produce programs that seem to work at times and then hang awaiting something that nevers happens other times. Remember, on every DataArrival event you can count on at most one byte of data - you need to write your own stream assembly and message parsing logic. One SendData call at a sender does not equal one GetData call at the receiver!

Sent:     abc
Received: a
          bc

If the program calls GetData until it gets "abc" it will never see it!

Bob Riemersma