>When upsizing a couple of large files (one > 100,000 records, one > 300,000), I get the following error:
Error #1234 in convertvfplogicaltosqlserverbit (1995): Subscript is outside defined range. >
>The following line of code is the culprit:
>
>lnLines = ALINES(laLines, lcFileStr)
>
>
>lcFileStr contains a string version of the entire file, evidently used for bulk inserts. At this point, the string is pretty big. I'm wondering if ALINES() can handle strings this large. MemLines() seems to work, but it will fall apart for records >8192 characters, since that is the limit for Set MemoWidth. Any suggestions?
Is it possible that ALINES() creates an array of over 65,000 elements? If so, that's the culprit - VFP arrays cannot have >65000 elements. I've handled very large strings with VFP, but there are limits to the LLFIO handlers in VFP6 and VFP7 at 16MB.
I'd try to either split the file, or avoid the array and use a cursor as an intermediary.