In MySQL, which I know you aren't using, this is addressed by terminating fields with a comma and enclosing them with quotes. I do the exact same thing with fields including commas and quotes and it works every time.

FileMaker does present a different predicament. My experience with its speed (or lack thereof) makes me wonder if how much time you will really save using one method over the other. Looping through records in FileMaker has always been so painful I would do almost anything to avoid it – including converting to MySQL : )

If you would still rather create an array, and if you have any control over the output of the csv file, you might consider terminating/delimiting your fields with a pipe or some other uncommon character like it. I have done this in cases where loading data was just not an option and it has also served very nicely.

Your array then, would look something like this:

<@assign user$csvdata value="<@array cols=2 value='<@arg csvdata>' rdelim='<@crlf>' cdelim='|'>">

Chris

On Apr 15, 2004, at 12:44 AM, Wayne Irvine wrote:

heres a simple way to get csv data into a witango array:

<@assign user$csvdata value="<@array cols=2 value='<@arg csvdata>'
rdelim='<@crlf>' cdelim=','>">

dunno if that helps any, just tossing it out hoping that it does

That doesn't address the issue of fields containing commas which is the sole
reason for this question in the first place?


Wayne Irvine

                  Byte Services Pty Ltd
               http://www.byteserve.com.au/
                  [EMAIL PROTECTED]
   Ph 02 9960 6099   Mob 0409 960 609   Fax 02 9960 6088

_______________________________________________________________________ _
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf



________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to