Doesn't ALTER TABLE expect the table not to be open already? What happens
if you

USE in crap

before the ALTER TABLE statement?

-Lew Schwartz


On Wed, Jul 10, 2013 at 6:48 PM, Mike Copeland <m...@ggisoft.com> wrote:

> Before they added "readwrite" to cursors, you could create a cursor and
> then reopen it using the DBF() workaround to get a cursor that was
> editable. Before that, cursors, especially the ones created with "select *
> from crap into cursor morecrap" were uneditable.
>
> At least that's how I remember it and it makes me happy, so that's my
> story.
>
> Mike Copeland
>
>
> -------- Original Message --------
> Subject: Re: Why can't I ALTER TABLE on a cursor?
> From: Kurt @ VR-FX <v...@optonline.net>
> To: profoxt...@leafe.com
> Date: 7/10/2013 5:41 PM
>
>> Yeah - that sounds about right - not sure why one would use this DBF()
>> thingy in the Alter...
>>
>> -K-
>>
>>
>> On 7/10/2013 6:25 PM, Thierry Nivelet wrote:
>>
>>> Alter table crap ... ?
>>>
>>> Thierry Nivelet
>>> http://foxincloud.com/
>>> Give your VFP app a second life in the cloud
>>>
>>> Le 11 juil. 2013 à 00:13, "MB Software Solutions, LLC" <
>>> mbsoftwaresolutions@**mbsoftwaresolutions.com<mbsoftwaresoluti...@mbsoftwaresolutions.com>>
>>> a écrit :
>>>
>>>  VFP9SP2
>>>>
>>>> My task is to import a text file which has 2 date fields that are in
>>>> MMDDYYYY format.  So I import them as C(8) and then convert them
>>>> afterwards.  I thought I could do this:
>>>>
>>>> CREATE CURSOR crap (provnum c(9), datepaid c(8), lastdos c(8), reimbamt
>>>> n(15,2), bonusamt n(15,2), datepaid2 d, lastdos2 d, filename v(200), tstamp
>>>> t)
>>>> APPEND FROM ? type DELIMITED && I use the File dialogue to pick my
>>>> import file
>>>>
>>>> REPLACE datepaid2 WITH CTOD(LEFT(datepaid,2)+"/"+**
>>>> SUBSTR(datepaid,3,2)+"/"+**RIGHT(datepaid,4)), lastdos2 WITH
>>>> CTOD(LEFT(lastdos,2)+"/"+**SUBSTR(lastdos,3,2)+"/"+RIGHT(**lastdos,4)),
>>>> filename WITH "crap", tstamp WITH DATETIME() ALL IN crap
>>>> ALTER table DBF("crap") drop COLUMN datepaid drop COLUMN lastdos
>>>>
>>>>
>>>> ...but it gives me a "File is in use" error.  I could have swore I did
>>>> this before successfully.  What am I doing wrong?
>>>>
>>>> tia,
>>>> --Mike
>>>>
>>>> --
>>>> Mike Babcock, MCP
>>>> MB Software Solutions, LLC
>>>> President, Chief Software Architect
>>>> http://mbsoftwaresolutions.com
>>>> http://fabmate.com
>>>> http://twitter.com/mbabcock16
>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cafuu78e0xr+lrci2vaqvsamt6nbtudm8dcdx7is+txsgett...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to