Help needed with splitfunction

Results 1 to 2 of 2

Thread: Help needed with splitfunction

  1. #1
    Join Date
    Dec 1969

    Default Help needed with splitfunction

    Hi, Form my multiple form i got folloving request results,<BR><BR>10, 20, 30, 40<BR><BR>When i use the split function like this:<BR><BR>dim AfdId<BR>AfdId = request.form("AfdId") <BR>AfdId = Split(AfdId,",")<BR>for i = 0 to ubound (AfdId)<BR>Response.write AfdId (i)<BR><BR>set rs = server.createobject("adodb.recordset")<BR>sql = "select * from Medarbejder where Afdeling = &#039;"&AfdId&"&#039;"<BR> sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText<BR>&#039;------------------------------------------<BR><BR>do while not rs.eof<BR> response.write "medarbejder "<BR> response.write rs("MedArbForNavn")<BR> rs.movenext<BR> Loop<BR>next<BR><BR>I&#039;v got 10, 20, 30, 40<BR><BR>and something like "Types mismatch" when i try to look into the database.<BR><BR>I think the problem is "the blank", but how do i get rit of it.<BR><BR>Thanks in advance<BR>Keld<BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help needed with splitfunction

    AfdId = Split(AfdId,", ") &#060;--- Note Space

Posting Permissions

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