Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids and SPT
Message
De
04/12/1999 21:28:03
 
 
À
04/12/1999 19:52:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00298661
Message ID:
00298811
Vues:
11
>>>I'm probably missing something basic but....
>>>
>>>I have a cursor build from an SQL Passthrough to a Oracle backend. I want to display the results of the sql in a grid. The grid's RecordSourceType is set to '1 - Alias' and the RecordSource to the name of the cursor. When I fetch the cursor (and verify that it has data) then run the form containing the grid, nothing shows in the grid.
>>>
>>>If I change the RecordSourceType to '4 - SQL Statement' and the RecordSource to 'Select * from sqlresults into cursor gridcursor' the data appears in the grid (but is now read only). I'd rather not have the additional select statement and a couple of the columns need to be updateable.
>>>
>>>Any Thoughts?
>>>
>>>Thanks
>>>Mark
>>
>>This is due to the fact that the Grid is instantiated prior to the SPT being done. I assume you are doing your SPT in the form init? If so, move the SPT to the form Load, then the cursor will exist when the Grid is instantiated and the design time setting won't have to be redone.
>>
>>BOb
>
>Nope....
>
>The cursor is built prior to the form load...
>
>nRet=SQLExec(oData.dbHandle,cSQL,'v_callhistory')
>
>Do form frm_callhistory
>
>
>The grid is actually on a page within a pageframe on the form. If I set the recordsource to '' and back to 'v_callhistory' in the init of the pageframe that holds the grid, the grid shows data.
>
>The point here is that the cursor exists prior to the instantiation of the grid.

>Thoughts???

-----------------------------------------------------------------------

You need to use the vfp command

requery()

to refresh the record source after the sql select or pass-through...

Kim

--------------------------------------------------------------------
Kim M. Lombard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform