Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Altering a CUSOR's structure
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00062738
Message ID:
00063246
Vues:
45
The way I've handled that in the past is to get a cursor which has most of what I need to start, then get whatever modifications and additions are needed and then select into a new cursor (I can't stand using CREATE TABLE because i'm lazy), combining the original and the old.

Simon


>>So far as I'm aware you can't other than getting the name of the temporary table with DBF() then USEing the table again in another area. If you have dependent forms, grid controls, etc on that cursor though you may well end up with inconsistencies between buffered data and data actually stored.
>>
>>If you know that you want a particular structure in a cursor then modify the SQL that creates it in the first place. You can create place holders for any of the standard field types in SQL.
>>
>>i.e. Select *, 0.00 as NewNumber, Space(10) newindex, date() as newdate from fred into cursor jim
>>
>>
>>>Does anyone know how to alter a cursor after it is created with CREATE CURSOR?
>>>I have found ALTER TABLE, but no ALTER CURSOR.
>>> Thanks.
>I have tried to get the DBF() but, there is no guarantee that the the DBF() of a cursor exists as a file. I also got a 'Table in Use' error when attempting to ALTER TABLE the USEd AGAIN version.
>I was playing with the idea of altering the structure of a cursor based on run-time information. I guess I'll just have to use CREATE/ALTER TABLE and handle clean up myself or forget about it.
> Thank you for the response.
_________________________________________
Objective 2000 Ltd
http://www.objective2k.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform