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

_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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