Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access characters beyond string (Error 62)
Message
 
 
À
11/02/2000 15:11:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00330344
Message ID:
00331098
Vues:
28
Fred & David,

I tested them again and again, and still had this error. Definitely is something wrong here :( I'm so tired today and lost...

This is my final test: (in a program test.prg) I hardcoded all values and still have a problem.
lcWhere='' && Pick up geography
lcState='MA' && Selected state

lcIssueMonth='01'
lcIssueYear='00'
lcDBF1='MASAL00'
lcDBF2='MASAL99'

lcBeginWeek='200001'
lcEndWeek=  '200004'

OutPutDir='J:\REDP\Output\MTD\' && OutPut Directory
lcTempTable=OutPutDir + 'PrntMTD'

lcWhere=lcWhere+iif(empty(lcWhere),"",[ and ])+[aa.CCODE+aa.TOWN=bb.County+bb.TOWN]

lcWhere2=strtran(lcWhere,'aa.','cc.')
lcWhere2=strtran(lcWhere2,'bb.','dd.')
*=messagebox(lcWhere+' '+lcWhere2)
set talk on
set talk window

select aa.*, lcIssueMonth as issuenum, " " as ntflag, ;
between(iif(val(extryear)<10,'20','19')+extryear+extrweek, lcBeginWeek, lcEndWeek) as currmnth,;
	    bb.fullname as FName, .t. as recap ;	    
		from  &lcDBF1 aa, Towns bb;
		where &lcWhere and ;
		iif(val(extryear)<10,"20","19")+extryear+extrweek<=lcEndweek;
		and aa.price >= 1000 and !deleted() ;
		into table (lcTempTable)


	

	select aa.*, lcIssueMonth as issuenum, " " as ntflag, .f. as currmnth,;
		bb.fullname as FName, .f. as recap ;
		from  &lcDBF1 aa, Towns bb;
		where &lcWhere ;
		and between(iif(val(extryear)<10,"20","19")+extryear+extrweek, lcBeginWeek, lcEndweek) ;
		and aa.price >= 1000 and !deleted() ;
		union;
		select cc.*, lcIssueMonth as issuenum, " " as ntflag, .f. as currmnth,;
		dd.fullname as FName, .f. as recap ;
		from  &lcDBF2 cc, Towns dd;
		where &lcWhere2 ;
		and between(iif(val(extryear)<10,"20","19")+extryear+extrweek, lcBeginWeek, lcEndweek) ;
		and cc.price >= 1000 and !deleted() ;		
		into table (lcTempTable)

>>
>>I just singled out substr(), any string function can fail in this way under VFP5.
>>
>>I'll bet the error is here:
>>
>>lcSourceTbl=lcState+"SAL"+right(lcYear,2)
>>
>>What is the value of lcYear when the code tries to run?
>>
>>>I'm sure, I didn't do such a thing!!!! :)
>>>This is my lcWhere expression: (from debugger)
>>>ccode='13' and aa.ccode+aa.town=bb.County+bb.town
>>>
>>>No substr at all...
>
>David,
>
>RIGHT() seems to work OK, even when the string is empty. (VFP5/TALK ON) Not sure about OTHER string commands...
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform