Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Trying to split an array for an insert into a database


Message #1 by "Jonathan Cocle" <jonathancocle@h...> on Tue, 20 Aug 2002 17:05:21
Greetings

For now what I am trying to do is being able to split an array to insert 
the values in a database. My array is built this way Code|Qty?Code|Qty? 
etc..
What i am trying to do is get all the Code in one string and get all the 
Qty in another string so i can insert them in the Database(Access). All my 
values are in a field in my form that is hidden and named hiddenList.
If anyone can help that would be much appreciated

Thanks
Jonathan
any question reach me at jonathancocle@h...
Message #2 by boryan@s... on Tue, 20 Aug 2002 23:53:38
Use flag to jump from code to qty

Something like (assuming that first array item is Code):

<% thisStrIsCode=true
for i=0 to UBound(arr)
if thisStrIsCode then
===this is Code... Add it to code string
thisStrIsCode=false
else
===this is Qty... Add it to qty string
thisStrIsCode=true
end if
next %>

  Return to Index