Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long Strings and command line
Message
From
29/11/2000 14:15:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Long Strings and command line
Miscellaneous
Thread ID:
00446944
Message ID:
00446944
Views:
35
Hello,

I've been bumping into same problem in two areas lately, and I thought it was something that VFP was done with (I was convinced for awhile that SP4 busted something on my setup).
1) I wrote a loop through an object to create a fieldlist and a varlist for an SQL statement string to use with ado connection.
The fieldlist and varlist collector statements were something along the lines of: lcFieldList = lcFieldList + obj.arow(i)

2) I tried to set a custom property (a field inclusion list) to a string of about 500 chars.

In both these cases, the statements broke because strings grew to > 256 chars. (I guess), so I had to break them up into separate statements. In the first case, I collected the partial strings into an array, adding an array element whenever the current string was going to exceed 256 chars. Then I concatenated all the element contents together to get the full string.
In the second case, I had to break up the list, as in
lcSubList1 = "etc,etc,etc,etc,...."
lcSubList2 = "etc,etc,etc,etc,...."
lcSubList3 = "etc,etc,etc,etc,...."
lcFullList = lcSubList1 + lcSubList2 + lcSubList3

Is there a better way to do this type of stuff with extra long strings? I was under the impression that VFP was over this barrier, but I guess not. If not, is it in VFP7 or the wish list for a future version?

Thanks
Rod Poujade
Montreal, Canada
Rod Poujade
Next
Reply
Map
View

Click here to load this message in the networking platform