Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection busy Cursor Adapter
Message
De
14/10/2009 13:45:42
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01429348
Message ID:
01429378
Vues:
59
Like remote views, you should have FetchAsNeeded = .f. and maxRecords=-1. This way one query has to complete before another is started.

>>>Hi there.
>>>
>>>I am facing a problem using Cursor Adapter class.
>>>
>>>Here is the detail
>>>
>>>1. I open the CA in the Init event of the Form
>>>2. I fill the cursor in the CA Init event. Type ODBC and The connection is a global connection created at the beggining of the app.
>>>
>>>There is 8 forms with one CA each. So far I've been able to have all of them open, but some time i got an err saying that the connection is bussy.
>>>
>>>any ideas why and how to fix this??
>>>
>>>this is the connection snippet
>>>
>>>
>>>	lcConnStr    = "Driver=SQL Server;Server=" + lcSqlServer + ";DATABASE=" + lcSqlDB + ";uid=" + lcSqlUser + ";pwd=" + ;
>>>                                lsDecript(lcSqlPass,lcSqlUser)
>>>	SQLSETPROP(0,"DispLogin",3)
>>>	SQLSETPROP(0,"DispWarnings",.F.)
>>>	lnConnection = SQLSTRINGCONNECT(lcConnStr,.t.)
>>>
>>
>>Do you want all of them to re-use the same connection? I would rather use one connection per each and close as soon as finished.
>
>Well, since i am a newbie on this. I have the approach i use before with remote views. Also I do not know the performance issue if i open a connection per every CA, if there is any. is it?
>
>or it is the best way to do it? open the connection on the init , close it on the destroy?
>
>TIA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform