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?
 Uppsala
 Sweden
 Anders Altberg
 To: prasanna kunder
  Where is prasanna kunder?
 mumbai
 India
 prasanna kunder
 Tags
Subject: RE: Ca Too Many Connection Error
Thread ID: 373592 Message ID: 373625 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 Category: Databases, Tables and SQL Server
Date: Sunday, March 24, 2013 12:16:04 PM         
   


> >
> >
> > Do you make a new connection for each query?
> > Do you use SQLDISCONNWCT( ) or SQLIDLEDISCONNECT( )?
> >
> > -Anders
>
> yes sir,
> sir pl.check my CA Class Threads
> and guide me that, something i am missing
>
> thanks again for your valuable time

As Tushar already explained, each time you run the line
lodo.DataSource=SQLStringConnect("DRIVER={MySQL ODBC 5.2(w) Driver};SERVER=192.168.0.52;database=maxell_Data;uid=root;pwd=pmk007")
you create a new connection, even though you already have a connection, unless you have run SQLDISCONNECT() between. One is enough. You don't need to open and close a connection for every Ca.
Creating and keeping connections cost the server memory space and it is telling you enogh is enough.
And they cost you extra time.
What you will need is some code when handling a Ca object that identifies the error that the connection has disappeared, and then executes a procedure to create a new valid connection.

-Anders

ENTIRE THREAD

Ca Too Many Connection Error Posted by prasanna kunder @ 3/23/2013 8:38:40 PM
RE: Ca Too Many Connection Error Posted by Anders Altberg @ 3/24/2013 1:24:14 AM
RE: Ca Too Many Connection Error Posted by prasanna kunder @ 3/24/2013 4:33:37 AM
RE: Ca Too Many Connection Error Posted by Anders Altberg @ 3/24/2013 12:16:04 PM
RE: Ca Too Many Connection Error Posted by Bernard Bout @ 3/24/2013 4:36:11 AM
RE: Ca Too Many Connection Error Posted by prasanna kunder @ 3/24/2013 4:43:58 AM
RE: Ca Too Many Connection Error Posted by anand kulkarni @ 3/25/2013 5:57:42 AM