Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Anders Altberg
 To: ChengTing Tsai
  Where is ChengTing Tsai?
 ChengTing Tsai
Subject: RE: Connection
Thread ID: 228313 Message ID: 228314 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, May 18, 2009 9:48:15 AM         

> Hi VFP experts
> I read Bernard's CA article.
> https://www.foxite.com/articles/read.aspx?id=49&document=creating-using-cursor-adapter-classes-a-simple-tutorial
> https://www.foxite.com/articles/read.aspx?id=53&document=creating-using-ca-classes-a-simple-tutorial-part-ii
> https://www.foxite.com/articles/read.aspx?id=54&document=creating-using-ca-classes-a-simple-tutorial-part-iia
> I was wondering if someone can explain the connection manager in CA.
> In SPT, After create a connection by Sqlstringconnect(),the desiger should use sqldisconnect() to disconnect the connection by myself.
> The purpose is avoid to waste resource in SQL Server.
> In CA,the desiger doesn't disconnect the connection. If designer disconnect the connection, the CA will happen error.
> I am curious How CA handle the connection. When CA disconnect the connection.
> Or the designer can ignore it. CA will handle it automatically.
> Thanks in advance.

Keeping a connection open isn't in itself a waste of resources; creating a new connction for every call to the server is not recommended.
In CA you have oConn.Open and oConn.Close.



Connection Posted by ChengTing Tsai @ 5/18/2009 9:38:45 AM
RE: Connection Posted by Anders Altberg @ 5/18/2009 9:48:15 AM
RE: Connection Posted by ChengTing Tsai @ 5/19/2009 1:34:16 AM
RE: Connection Posted by Bernard Bout @ 5/19/2009 6:09:01 AM
RE: Connection Posted by ChengTing Tsai @ 5/19/2009 10:05:02 AM