Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Trouble
Message
De
30/12/1999 12:28:36
Jimmy Ditta
Twin City Electronics
Monroe, Louisiane, États-Unis
 
 
À
30/12/1999 12:06:39
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00310435
Message ID:
00310502
Vues:
16
>Jimmy-
>
>>
>>I don't understand how to reference a particular field in a cursor - nor how to "declare a field in a cursor." for instance... would i say this:
>>select table.field as cursorfieldname
>>from table
>>into cursor cursorname
>
>You reference fields in a cursor just like you do a table. Indeed, "cursor" really refers to any record source once it's open, whether it came from a view, or a table. The thing is that unless you direct the SQL Select to something to hold the data, it just get's dumped in a browse..which isn't what you want.
>
>
SELECT data1.bundle as Total12;
>FROM lumber!data1 <B>INTO CURSOR vwDATA1<b> ;
>WHERE siz = szValue and grade = gdValue and length = 2;
>[...snip]
>
tb2 = vwData1.Total12 + [etc]
>
>FWIW, this logical structure looks problematic to me, but then you were asking about how you get rid of the browse windows popping up.


It is problematic, but I don't know how else to do it yet. I've only been programming for a couple of weeks now. It's telling me that "variable 'Total12' is not found".

here's my code:



SELECT data1.bundle as Total12;
FROM lumber!data1 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data2.bundle as Total22;
FROM lumber!data2 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data3.bundle as Total32;
FROM lumber!data3 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data4.bundle as Total42;
FROM lumber!data4 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data5.bundle as Total52;
FROM lumber!data5 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data6.bundle as Total62;
FROM lumber!data6 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;

SELECT data7.bundle as Total72;
FROM lumber!data7 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


SELECT data8.bundle as Total82;
FROM lumber!data8 into cursor bundata;
WHERE siz = szValue and grade = gdValue and length = 2;


tb2 = bundata.Total12 + bundata.Total22 + bundata.Total32 + bundata.Total42 + bundata.Total52 + bundata.Total62 + bundata.Total72 + bundata.Total82
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform