Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

[RESOLVED] How to prevent VB6 from hanging while refreshing remote database?

$
0
0
Hi everyone.

I have this big all-right program, and I want to add to it an ADODC that reads from a remote database (throught a DSN with ODBC) every 5 seconds for read for messages from me or other users, like a chat.
It's all fine, but every time I do Adodc1.Refresh, the programs hangs for 1 second or so, and it can be annoying if you're typing or something.

So, how can avoid that little delay, so the control can work in background without freezing everything else?
I'm using an Adodc1, not by code but design-created, whose only ConnectionString is DSN = MyDsn.
Every time I do:
Code:

AdoDc1.RecordSource = "SELECT * FROM messages where read = 0"
AdoDc1.Refresh

if freezes for 1 second or so. (Works perfectly, the only problem is the one I mentioned.)

Thank you.

Viewing all articles
Browse latest Browse all 21271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>