Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Questions about SQL SELECT to fill a Grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Questions about SQL SELECT to fill a Grid
Divers
Thread ID:
00447308
Message ID:
00447308
Vues:
40
I have a grid on a form. I have an SQL SELECT statement in the form init.

My SELECT code:
SELECT master.incident, master.patnum, master.patqty, master.name_last, master.name_first, ;
	master.sitename, master.addr1a, master.citya, ;
	master.mcoid, master.date, arrest.sca_ctr, arrest.closed, arrest.incident ;
	FROM master JOIN arrest ON master.incident = arrest.incident ;
	ORDER BY master.date INTO CURSOR cuRowSource
I set Grid RowSource to cuRowSource and Grid RowSourceType to 1-Alias. How come I get a blank grid at run time. When I change Grid RowSource to the Default I get a grid showing my Column Headings and Widths, but the columns are partially filled with data from my SELECT and some columns are left blank. I have never used a grid like a Listbox before. What might I be doing wrong?

I assign the grid's column headings and column widths in the Grid Init Event. Do I have to also assign each column to a SQL SELECT fieldname? Or how is that done? I assumed the SQL SELECT would fill the grid in the order that the fields are listed in the SQL SELECT statement. But that's when I get a blank grid with no headings, no lines, no data. What's wrong?

Thanks so much.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform