Using split in Arrays

Results 1 to 2 of 2

Thread: Using split in Arrays

  1. #1
    Join Date
    Dec 1969

    Default Using split in Arrays

    I created an array based a field from a database. some of the data in the field contains null values and some csv.<BR><BR>I am using split to convert the csv to standalone values. I however wish to do error checking to ensure that the split command do not run if the field contains a null value.<BR><BR>does anyone have an idea, how to do this error checking? I tried using:<BR>if is null (my_array)= false then<BR>my_array=split(my_str, ",")<BR>end if<BR><BR>but this is returning an error.

  2. #2
    Join Date
    Dec 1969

    Default RE: Using split in Arrays

    Why are you testing the array for null values when you haven&#039;t created it yet? Surely you should be testing the string value.<BR><BR>Try something like this:<BR><BR>If Len(my_str & "") &#062; 0 Then &#039; This tests for Null AND empty strings<BR>my_array=Split(my_str,",")<BR>End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts