Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection to Back end keeps breaking
Message
De
01/08/2013 11:39:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01579644
Message ID:
01579645
Vues:
59
You should never rely on the connection to be available 24/7. A couple of options:

- Make the connection every time it's needed
- Test the connection when you need it. It if's closed or timed out, reconnect

>I have a situation that is bugging me and my client
>
>I have a Time Attendance Clock that runs 24/7.
>
>I make a a connection using SQLSTRINGCONNECT
>
>
>lcConnStr = "Driver=SQL Server;Server=ServerName;DATABASE=MyDB;uid=User;pwd=*****"
>lnConn    = SQLSTRINGCONNECT(lcConnStr)
>
>
>
>and everytime a employee punches I send the punch to the backend using SQLEXEC
>
>
>llReturnVal = SQLEXEC(lnConn,lcSQLStatement)
>
>
>
>Now here's my issue. and it has became a pain in the rear:
>
>all of a sudden, randomly the connection to the backend breaks and since lnConn is a Connection Handler, it becomes useless. and Employees can't punch
>
>I know i can restore the connection, but this implies a lot of reloading of data since i am using Cursoradapters too.
>
>my questions to you all:
>
>1. what are the possible reasons why a connection to MSSQL breaks? Network? My app? VFP? CursorAdapters?
>2. is there any way to monitor this?
>3. is there any other approach, better and faster?
>
>
>Karben Selim Mejia
>
>Honduras, Central America
>The very centre of the world
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform