Results 1 to 4 of 4

Thread: ADO/SQL7 Application freezes during connect.

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    2

    Post

    Hello.

    I've got a question regarding an ADO/SQL which may very well be more appropriate in another topic but wasn't sure.

    I've written a VB6-SQL 7 app which connects to a remote db and does some pretty basic querying using the conventional ADO techniques and have noticed that while it is in the process of connecting, the program "freezes" or stops responding (until it eventually connects). Is there any way to simulate a better threading or free things up a bit while it is connecting? I've tried playing with some DoEvents to no avail. Any suggestions? Thanks in advance!

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    you can use ADO to connect asynchronously, or you could also specify a CONNECT TIMEOUT parameter in your connection string (the default is 60 seconds) and make it 30 or so...

    I have previously posted code on how to connect asynchronously @ http://www.vb-world.net/ubb/Forum3/HTML/002439.html

    enjoy

    Tom

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Posts
    2

    Post

    Tom, thanks a lot for your help. I believe it suits the purpose.. having a bit of trouble getting the ConnectComplete event to fire with a async connection.. Could this be because it's connecting using a different process?

    Thanks again!

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    I'm not sure why, I used that code with SQL 7 as well....

    Check out this site, it might provide some answers
    http://support.microsoft.com/support...G=ENG&SA=ALLKB

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width