Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Foxpro&MTS&ADO

Status
Not open for further replies.

fruityBoy

Programmer
Jul 21, 2000
51
GB
Hi I am experiencing speed problems when using MTS, Foxpro and ADO.

Essentially, what I am doing is creating middle tier business logic as VFP dll's, enlisting them in transactions, and reading / entering information in SQL Server 7.0 using ADO 2.6.

The problem that I experience, is that, when opening a connection object (within the MTS component), the program takes 15 seconds.

I have tried exactly the same code in Visual Basic and the results are instant. Does anybody know of any issues with what I am attempting?

I am using Vis Studio 6 with SP4 BTW.

Thanks for your help
 
Hi, just in case anybody has read this and was wondering what the problem was, I have discovered the solution.

SP4 adds functionality to VFP which allows it to perform it's own garbage collection when using com objects(yep, ADO!).

Now, there is an issue with this when running under MTS (I think because MTS does it's own garbage collection), so the solution is to stop Foxpro clearing these objects itself.

The text from Microsoft is :
SYS(2339 [, 0 | 1 ])

0 - CoFreeUnusedLibraries is not called

1 – CoFreeUnusedLibraries is called

Remarks

If SYS(2339) is OFF, then CoFreeUnusedLibraries is not called. This means that whenever a Visual FoxPro DLL server releases an instance of another server (for example, ADO Connection), we do not call CoFreeUnusedLibraries.
Adding SYS(2339,0) might also help to improve performance and scalability.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top