ADO Blocking and wodsshtunneel.exe - WeOnlyDo Discussion board

ADO Blocking and wodsshtunneel.exe (General questions)

by Mark Sauer, Saturday, March 18, 2006, 00:18 (6825 days ago)

I am attempting to create a small application which needs to go out and connect securely to a MySQL database on a web server. The connection initiates from a VB application running on a PC. I am able to create a tunnel and connect via a seperate mySQL client, but I am not able to connect via ADO within my application. This is exactly the behavior I need though.

From what I understand, the problem is that VB6 does not have threading, thus all processes run under one thread. When I call the ADO execute method, it blocks the thread and my application freezes up.

What is the best way to get around this threading limitation? Should I write the application with VB.Net instead? If I do write the app with VB.Net, will ADO.Net behave differently?

Any ideas/suggestions are greatly appreciated.

-Mark

Re: ADO Blocking and wodsshtunneel.exe

by wodSupport, Saturday, March 18, 2006, 01:56 (6825 days ago) @ Mark Sauer

Hi.

VB.NET would solve it, yes, since you can run there wodSSHTunnel or ADO client in separate thread.

You can also try to set Threads property to true. You can also try to use EXE version of wodSSHTunnel (out proc server), called wodTunnelServ.

I'm not sure if any of this would help, tho... It would be best if you could use CreateThread API, but I'm not sure how stable that would be. Search on google for

VB6 CreateThread

and you'll find some discussions about this, such as this one:

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=14479&lngWId=1

Hope I helped.
Kreso

Re: ADO Blocking and wodsshtunneel.exe

by Mark Sauer, Saturday, March 18, 2006, 02:02 (6825 days ago) @ wodSupport

Thanks for the information. I have been researching some other code samples that make use of a pseudo out-of-process wrapper for VB6. You create an ActiveX.exe (similar to what you guys do with your ActiveX.exe) which implements this threading wrapper.

I'll post feedback here about it if I can get it all working. I am hoping to accomplish all of this without using VB.Net - mainly to keep my distribution and install simple.

Thanks again!

Re: ADO Blocking and wodsshtunneel.exe

by wodSupport, Saturday, March 18, 2006, 02:04 (6825 days ago) @ Mark Sauer

Mark,

if you can put wodSSHTunnel into separate process and execute it, then you have everything solved.

Kreso