Actually I am talking about ASP request. Whatever, my code is like that;
<%
Lcode = request.form("Lcode")
response.write Lcode
%>
but the element in the form-combobox-is multiple-select-allowed. Acording to this, Lcode that I am trying to write is returning a result like
MSC10301, MSC10302,...
I want to seperate these codes like;
MSC10301
MSC10302
...
I am asking about that. Because I will return an Insert query after receiving Lcode and seperate it that Lcode is the Primary key.
Ok i solved the problem
: )
it was very easy
: D
these r the codes...
: D
<%
function virguleGoreKelimeSayisi(nesne)
vs = 0 'NUMBER OF SEPERATORS IN THE STRING
if Len(nesne) > 0 then
for basla = 1 to Len(nesne)
if Mid(nesne,basla,1) = "," then
vs=vs+1
end if
next
end if
virguleGoreKelimeSayisi = vs+1
end function
function cokluGelenAyir(gelenler, kacinciKelime)
gelenler = gelenler&","
s = array( g0, g1 , g2 , g3 , g4 ) '5 ARRAY FOR 5 WORDS
kelimeNo = 0 'NUMBER FOR EVERY WORD
for start = 1 to Len(gelenler)
if Mid(gelenler,start,1) <> "," then
kelime = kelime&Mid(gelenler,start,1)
elseif Mid(gelenler,start,1) = "," then
s(kelimeNo) = kelime
kelime = Null
kelimeNo = kelimeNo + 1
start = start+1
end if
next
cokluGelenAyir = s(kacinciKelime-1)
end function
%>