Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange error 1113 File is not open
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Strange error 1113 File is not open
Miscellaneous
Thread ID:
00570262
Message ID:
00570262
Views:
66
Hi everybody,

Bellow is a piece of code. On the CREATE TABLE statement I get File is not open error. I don't understand, what's wrong. More info: the same code works fine for creating Transaction files, the difference with another program, which works fine, is the file name (in first case, "Sales", in this case "Credit").
lcNewFile=forceext(m.lcSourceDir + left(m.lcState,1) + m.lcIssWeek+ "Credit","DBF") &&forceext(laDBFs(m.lnI,1),"DBF")
lcNewLogFile = forceext(m.lcNewFile, "LOG")
wait window nowait "Creating new Credit file for week " + m.lcFullIssWeek
on error 
set step on
for lnI=1 to m.lnFiles
	lcFileName=addbs(m.lcPath)+laDBFs[m.lnI]
	lcJustName = juststem(m.lcFileName)
	if m.lnI = 1 && First file
		select "C" as Source, Towns.CCODE, Towns.TOWN, ;
			MISCTYPE, ;
			DOCKETREF, ;
			INITDATE, ;
			PRICE, ;
			DEF1CODE, ;
			DEF1NAME, ;
			DEF2NAME, ;
			DEF2CODE, ;
			ALIAS1CODE, ;
			ALIAS2CODE, ;
			ALIAS3CODE, ;
			ALIAS1, ;
			ALIAS2, ;
			ALIAS3, ;
			STNUM, ;
			STNUMEXT, ;
			STREET, ;
			LOTCODE, ;
			UNIT, ;
			ZIP as ZipCode, ;
			PLAINTIFF as PLAINTIFF1, ;
			PLAINTIFF2, ;
			PUB, ;
			PUBDATE, ;
			TAXTYPE1, ;
			TAXTYPE2, ;
			ctot(dtoc(SALEDATE)+SALETIME) as SALEDATETM, ;
			SALETIME, ;
			AMORPM, ;
			SALELOC, ;
			RESPDATE, ;
			DEPOSIT, ;
			SHERATTY, ;
			PHONENUM, ;
			ORIGMORTG, ;
			LINE1, ;
			PROMOFLAG, ;
			BATCHNAME, ;
			M.lcJustName as FileName, ;
			ITEMDESC, ; 
			iif(EXTRYEAR<"10","20"+EXTRYEAR,"19"+EXTRYEAR) as EXTRYEAR, EXTRWEEK ;
			from (m.lcFileName) tbl ;
			INNER join Towns on tbl.CCODE+tbl.TOWN=Towns.CCODE+Towns.townold ;
			into table (m.lcNewFile)
			lcDBFAlias = alias()
			*** Create a log file
			create table (m.lcNewLogFile) free ;
			       (FileName C(8), State C(2), ;
			        ExtrYear C(4), ExtrWeek C(2), ;
			        rCode C(2), ccode C(2), town C(4), DSId I, ;
			        LogNumSal I, LogNumMtg I, LogNumCrd I, LogNumMM I, ;
			        Record_Fm D, Record_To D, LandCt_Fm D, LandCt_To D, ;
			        ActNumSal I, ActNumMtg I, ActNumCrd I, ActNumMM I, ;
			        MinActDate D, MaxActDate D, NumMMDocs I, NumCoded I, ;
			        CalMnth C(6), MDFlag L, Notes M, DDFlag L, CDFlag L, MWDFlag L)	
			lcLogAlias = alias() && Save log alias
Any help would be appreciated.
If it's not broken, fix it until it is.


My Blog
Next
Reply
Map
View

Click here to load this message in the networking platform