Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid problem when changing cursor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid problem when changing cursor
Divers
Thread ID:
00608558
Message ID:
00608558
Vues:
51
Hi all,

I've got some problems with my grid (ones again)

here my Method's code
*--------------------------------------------------
LOCAL strSql as string

strSql = "asp_GetClientAppel @Id_Client =" + ALLTRIM(STR(client.Id_Client)) + ", @Langue = " + strDblq(Z_Lang)

IF used("apClient") THEN
	SELECT ("apClient")
	USE
ENDIF
	
IF SQLEXEC(z_conn,strSql,"apClient") >= 0
	thisform.pgfClient.pagSpecification.grdVox.RecordSource = ""
	Select * from ("apClient") INTO CURSOR lCurApClient READWRITE noconsole
	thisform.pgfClient.pagSpecification.grdVox.RecordSourceType = 1
	thisform.pgfClient.pagSpecification.grdVox.RecordSource = "lCurApClient"
ENDIF
*---------------------------------------------------
When I do this, all is allright, the grid stay in his first state all columns are like I designed them.

I tried to suppress the "lCurAPClient" cursor and directly use the "apClient" cursor as RecordSource, but I lose all the grid design.

What's wrong in the following code?
*--------------------------------------------------
LOCAL strSql as string

strSql = "asp_GetClientAppel @Id_Client =" + ALLTRIM(STR(client.Id_Client)) + ", @Langue = " + strDblq(Z_Lang)

IF used("apClient") THEN
	SELECT ("apClient")
	USE
ENDIF
	
IF SQLEXEC(z_conn,strSql,"apClient") >= 0
	thisform.pgfClient.pagSpecification.grdVox.RecordSource = ""
	thisform.pgfClient.pagSpecification.grdVox.RecordSource = "apClient"
ENDIF
*---------------------------------------------------
Thanks a lot
Thierry
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform