Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
500 char String too long?
Message
From
17/06/2011 15:57:13
 
 
To
17/06/2011 14:18:04
Victor Chignes
Inteliventas
Peru
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01514836
Message ID:
01514976
Views:
50
>Hello Al.
>
>Al variables are local.
>I have changed the name of the variables so there is no conflict possible.
>Even more weird, I tried the following code:
>
>		campos1=''
>		set textmerge to  MEMVAR campos1
>		set textmerge on noshow
>		FOR i=1 TO lnCampos
>			IF ASCAN(TblFields, UPPER(This.iadata[i,1]) )>0
>				\\<<ALLTRIM(UPPER(This.iadata[i,1]))>> ,
>			ENDIF
>		endfor
>		set textmerge off
>		set textmerge to
>
>and this does not work either, when the string reaches the dreaded limit . For a strange thing, if I replace the old code:
>
>			FOR k=1 TO lnCampos
>				IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0
>					zz=this.iaCampos[k]+","
>					MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos )
>						This.Campos=This.Campos+zz
>				END
>
>with this
>
>			FOR k=1 TO lnCampos
>				IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0
>					zz=this.iaCampos[k]+","
>					MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos )
>						This.Campos=This.Campos+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + zz
>				END
>
>the variable reaches 900 chars before it bombs, instead of 500.

At least it sounds like your problem is reproducible :) The first thing I'd do would be to trace in the debugger. Then you can look at local variables etc. to see if there's anything weird like unexpected characters in the array elements etc. If you know it's going to bomb at about 500 characters you could do something like this:
  FOR k=1 TO lnCampos
     * DEBUG *
     IF LEN( zz ) > 480
        SET STEP ON

     ENDIF
     * END DEBUG *

	IF ASCAN(TblFields, UPPER(this.iaCampos[k]))>0
		zz=this.iaCampos[k]+","
		MESSAGEBOX(zz+" "+STR(len(This.Campos)) +" "+ This.Campos )
		This.Campos=This.Campos+zz
	END
If that doesn't show anything unusual I have only left-field ideas left:

- try disabling any real-time scanning component of antivirus software
- clean out any leftover temporary files from the Windows and/or VFP temp file folders
- related to the above, run CHKDSK to make sure the file system is in good shape
- make sure you're not running out of disk space, or hitting any disk usage quota that may have been set
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform