VBScript Array to DB

Results 1 to 2 of 2

Thread: VBScript Array to DB

  1. #1
    BuhBuh Guest

    Default VBScript Array to DB

    Hi,<BR><BR>What is the best way to save the content of a VBScript array in a database? As I see it, I can&#039t put the value of the Array in a database like I save the value of some form data. I&#039m looking for some tips here guys...thanks.

  2. #2
    Join Date
    Dec 1969

    Default A way, should work fine

    Hmm.<BR><BR>Well, I believe BW posted this once,<BR><BR>the thing to do is iterate through the elements of the array and<BR>build a comma seperated list, then put the string into the db, and when you grab string from the db,use split(arg,",") to get your array back.<BR><BR>The post was awhile back... something like,<BR> i = 0<BR>for i = i to ubound(yourarray)<BR> arraystr = arraystr & yourarray(i) & ","<BR>next<BR><BR>there is some tricks to getting it come out correct, like a trailing comma, this is just to give you a general idea

Posting Permissions

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