Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is the dbf of my cursor?
Message
From
04/09/1998 10:43:31
 
 
To
04/09/1998 10:36:49
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00132835
Message ID:
00133300
Views:
11
>>>Edward,
>>>If dbf(mycursor) is a table (temporal but a table until i close cursor). If i can open it exclusively (more or less) cause i can index it after 'use dbf() again in 0'. ¿Why can't i use 'alter table...'?
>>>how can you modify initial select to get a general field in cursor? and to get a numeric(6, 3) field you must include a value like 134.567 in select clause and after replace all with 0? That's not a very fine way, isn't it?
>>
>>I said, 'probably you can't use ALTER TABLE. If you tried and it works, so good for you, anyway I cannot be blamed for some VFP command syntax rules.
>>In regard to SELECT: you can always add dummy field there to get new numeric:
>>Select *,000.000 as dummy from table1 into cursor tmp
>>General field is a little bit more complicated, but not too much:
>>create cursor tmp (genfield G NULL)
>>insert into tmp values(.NULL.)
>>select table2.*,genfield from table2,tmp into cursor tmp1
>
>Edward,
>No blame of course. I apreciate a lot your comments but take a look at this code, was suggested by Cetin and works fine:
>
>select all * from polizas into cursor ppp nofilter
>use dbf("ppp") again in 0 alias ppp2
>use in ppp
>select ppp2
>alter table ppp2 add prueba g
>
>that's a good solution using alias in 'alter table' instead of table name. We'll remain in the ignorance why file(dbf("ppp")) returns .f.
>
>Best regards,
>Carlos

I had nothing against Cetin's code. In regard to FILE() problem: if something doesn't work, you just apply another way and go ahead. There are so many things around which don't work properly, that ramming at them again and again is just wasting of time.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform