Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add columns to cursor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00817815
Message ID:
00817830
Vues:
21
Hi Nick,

ALTER TABLE works on cursors as long as they don't have long field names. You can also add a column directly into query.
SELECT PADR(ALLTRIM(fname)+' '+alltrim(lname),32) as Person, dob ;
    from person INTO CURSOR test readwrite
ALTER TABLE test ADD COLUMN Send L(1)
* OR 
SELECT PADR(ALLTRIM(fname)+' '+alltrim(lname),32) as Person, dob, .F. AS Send ;
    from person INTO CURSOR test readwrite
>I am trying to add a column to a cursor that will be displayed in a grid. Here is the code:
>
>
>SELECT ALLTRIM(fname)+' '+alltrim(lname) as Person, dob from person INTO CURSOR test readwrite
>ALTER TABLE DBF('test') ADD COLUMN Send L(1)
>thisform.g1.RecordSource='test'
>thisform.g1.Refresh
>
>
>However ALTER command is not working on the cursor. Is there a way to add column to a cursor? Also, in the grid I would like to display this added column (send) as a check box. Can I add checkbox to grid progamatically looking at cursor test.send column?
>
>Thanks
>Nick Patel
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform