Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot Get Grid to Show Data
Message
 
 
À
19/10/2011 14:19:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01526899
Message ID:
01526900
Vues:
44
>I have a form that contains two grids. The first grid is populated with data when the form loads. The second grid is populated when a user selects an item from grid1. In the click event of grid1 I call the refresh event of grid2. I set the recordsource equal to a sql statement in the refresh event of grid2 and have the recordsourcetype = SQL. Everything works great in my test environment but when I try it out on a different computer the grid2 does not get populated. Any suggestions would be greatly appreciated.
>
>
>*****Grid1.Click()******
>
>thisform.pageframe1.page1.grid2.refresh()
>
>
>
>*****Grid2.Refresh()*****
>
>this.HighlightStyle = 1
>
>this.RecordSource = "SELECT PADR(shapeconv(a.desc,a.dim1,a.dim2,a.dim3,a.misjunk),25) AS section,a.qty,"+;
>				"a.len_ft,fractionconv(a.len_in) as inches,a.porder,a.popage,a.poline,a.len_in,a.pcid,"+;
>				".f. as selected "+;
>				"FROM inventory a INTO CURSOR curSelections WHERE !DELETED() AND EMPTY(a.recvdate) and "+;
>				"a.porder IN (SELECT b.porder from curPorder b WHERE b.selected = .T.) "+;
>				"ORDER BY 5,6,7,1,3,4 READWRITE"
>					
>
>
>
>
>
>Thanks in advance,
>Russell

Try setting this.RecordSource = '' before last line.

I actually suggest to use a cursor instead and safe-select approach.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform