Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Loosing Cursor Focus
Message
De
02/03/2005 10:27:35
Steven Dyke
Safran Seats USA
Texas, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Loosing Cursor Focus
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00991972
Message ID:
00991972
Vues:
65
For some reason the following code is not retaining my Report Cursor.

The following code is set to a timer to monitor app status. When I pull up a report based on a select statement the report looks okay for a few minutes but eventually looses the focus to the cursor it was based on. The cursor the following code uses becomes the current Alias() permenatly.

Function applicationStatus()
Local apst, lpuseridpc
apst = -1

If Empty(Alias()) Then
If Not Used('app_status') Then
Use app_status Again Shared In 0
EndIf
Select app_status
EndIf

esglobal.current_table = Alias()

Do Case
Case runenviroment = "Test"
esglobal.appStatusConn = SQLSTRINGCONNECT(lcConnection2('UserDataTest'))
Case runenviroment = "Production"
esglobal.appStatusConn = SQLSTRINGCONNECT(lcConnection2('UserData2'))
EndCase

If esglobal.appStatusConn (lessThan)Or = 0 Then
*Cancel
Else
Do Case
Case betaflag = .F.

sflgpro = "Select * From appstatustable Where appname = 'Engineering Schedules'"
Case betaflag = .T.

sflgpro = "Select * From appstatustable Where appname = 'Engineering Schedules-Beta'"

EndCase

=SQLSETPROP(esglobal.appStatusConn, 'Transactions', 2)
apst = SQLEXEC(esglobal.appStatusConn, sflgpro, 'myAppStatusv5')

If reccount('myAppStatusv5') (greaterThan) 0 Then

esglobal.appStatusMessage = myAppStatusv5.appmsg
esglobal.appStatusShutDown = myAppStatusv5.appsd
esglobal.appStatusStopLogon = myAppStatusv5.appslo
esglobal.appStatusTimerSet = myAppStatusv5.timerset
esglobal.appVersion = myAppStatusv5.appver
esglobal.appErrorLog = myAppStatusv5.errorp

EndIf
=SQLDISCONNECT(esglobal.appStatusConn)

Select (esglobal.current_table)
EndIf

EndFunc
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform