Click here to Skip to main content
14,212,594 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi guys and girls, I really hope someone can give me some help.

I have a vb6 app that connects to an odbc datasource. I'm trying to write a function that will tell me whether the connection to sql is still open so that I can take my app offline if not, but everytime I query the odbc connection, my app hangs and I have to close it via task manager. I have already tried setting the connection and command time out properties. Any suggestions?

Thanks in advance :)

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

I think your code fall in a continues loop. So check your code twice.
Use timer control with good interval. And also before execute your query stop timer until execution complete. Because if execution time take long then next trigger of timer control may occur for this reason your application may hang..
Ace_Hardlight 19-Nov-12 3:10am
Problem is, nothing executes after the statement adoconnection.execute. vb6 just hangs and I've made sure the properties are set before execution happens

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.2 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100