Script timeout (Long loop process)

Discussion in 'ASP General' started by Rajani, Jan 5, 2005.

  1. Rajani

    Rajani Guest

    Hello,

    First of all sorry for the long code. But i want to explain clearly what i
    am doing.

    For i = 0 To UBound(arrResSizes) - 1
    For j = 0 To UBound(arrqty) - 1
    For k = 1 To totopr Step 8
    tempjob = right(jc,5)
    tempsize = left(arrResSizes(i) & " ", 3)
    headsize = left(arrResSizes(i) & " ", 6)
    tempqty = Right(" " & CStr(arrqty(j)), 2)
    templay = Right(" " & CStr(lno), 3)
    tempbdl = Right(" " & bdlno, 5)
    tempopr = Right("00" & k, 2)
    'tempcolor = Left(getColorName(arrColorCodes(j)) & "
    ", 6)
    tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "
    ",6)
    strop = strop & tempjob & " " & tempsize & " " &
    tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
    & " " & headsize & " "
    If (k + 1) <= totopr Then
    tempopr = Right("00" & k + 1, 2)
    strop = strop & tempopr & " " & tempjob & " " &
    tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    vbcrlf & vbcrlf & vbcrlf
    Else
    strop = strop & vbcrlf & vbcrlf & vbcrlf
    End If
    If (k + 2) <= totopr Then
    tempopr = Right("00" & k + 2, 2)
    strop = strop & tempjob & " " & tempsize & " " &
    tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
    & " " & tempqty & " PCS" & " "
    Else
    strop = strop & "
    " & tempqty & " PCS "
    End If

    If (k + 3) <= totopr Then
    tempopr = Right("00" & k + 3, 2)
    strop = strop & tempopr & " " & tempjob & " " &
    tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    vbcrlf & vbcrlf & vbcrlf
    Else
    strop = strop & vbcrlf & vbcrlf & vbcrlf
    End If
    If (k + 4) <= totopr Then
    tempopr = Right("00" & k + 4, 2)
    strop = strop & tempjob & " " & tempsize & " " &
    tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
    & " " & tempcolor & " "
    Else
    strop = strop & "
    " & tempcolor
    End If

    If (k + 5) <= totopr Then
    tempopr = Right("00" & k + 5, 2)
    strop = strop & tempopr & " " & tempjob & " " &
    tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    vbcrlf & vbcrlf & vbcrlf
    Else
    strop = strop & vbcrlf & vbcrlf & vbcrlf
    End If

    If (k + 6) <= totopr Then
    tempopr = Right("00" & k + 6, 2)
    strop = strop & tempjob & " " & tempsize & " " &
    tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " & tempopr
    & " " & tempjob & " "
    Else
    strop = strop & "
    " & tempjob
    End If

    If (k + 7) <= totopr Then
    tempopr = Right("00" & k + 7, 2)
    strop = strop & tempopr & " " & tempjob & " " &
    tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    vbcrlf & vbcrlf & vbcrlf
    Else
    strop = strop & vbcrlf & vbcrlf & vbcrlf
    End If
    Next
    bdlno = bdlno + 1
    rowcounter = 1
    Next
    Next


    The first loop may be having 5 iterations(0 to 5)
    Second - (0 to 20)
    third may be (1 to 52)

    Its taking so much time to produce the final output(nearly 5 mts). I got an
    error initially "Script timeout". I have set the value to 180
    "server.scripttimeout=180" Now its ok. But taking some long time to display
    output. Even in the server itself.

    Some times the first loop may be 0 to 12

    Is my coding is wrong? or any other sollution is there to get the fast
    output for this?

    Pls help me. After executing i am saving the output(strop) in a text file
    using FSO(that my need).

    Thanks in advance.

    The output could be liek this

    http://m.1asphost.com/tsimsha/tickets.txt
     
    Rajani, Jan 5, 2005
    #1
    1. Advertising

  2. Rajani

    io Guest

    G'day Rajani,

    There is nothing wrong with your code. The killer most likely is string
    management routines, namely, memory allocation routines that manage string
    concatenations. I suggest you modify your code so that you accumulate the
    output into array(s) and then use JOIN() to produce the final output string.
    Have a look at the very basic code below - it should give you an idea what I
    mean:

    dim i, sTemp, aOut(), sOut

    for i = 0 to 1000000
    sTemp = <your code>
    ReDim Preserve aOut(i)
    aOut(i) = sTemp
    next

    sOut = Join(aOut, <delimeter>)

    Cheers


    "Rajani" <> wrote in message
    news:D...
    > Hello,
    >
    > First of all sorry for the long code. But i want to explain clearly what

    i
    > am doing.
    >
    > For i = 0 To UBound(arrResSizes) - 1
    > For j = 0 To UBound(arrqty) - 1
    > For k = 1 To totopr Step 8
    > tempjob = right(jc,5)
    > tempsize = left(arrResSizes(i) & " ", 3)
    > headsize = left(arrResSizes(i) & " ", 6)
    > tempqty = Right(" " & CStr(arrqty(j)), 2)
    > templay = Right(" " & CStr(lno), 3)
    > tempbdl = Right(" " & bdlno, 5)
    > tempopr = Right("00" & k, 2)
    > 'tempcolor = Left(getColorName(arrColorCodes(j)) & "
    > ", 6)
    > tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "
    > ",6)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & headsize & " "
    > If (k + 1) <= totopr Then
    > tempopr = Right("00" & k + 1, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > If (k + 2) <= totopr Then
    > tempopr = Right("00" & k + 2, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempqty & " PCS" & " "
    > Else
    > strop = strop & "
    > " & tempqty & " PCS "
    > End If
    >
    > If (k + 3) <= totopr Then
    > tempopr = Right("00" & k + 3, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > If (k + 4) <= totopr Then
    > tempopr = Right("00" & k + 4, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempcolor & " "
    > Else
    > strop = strop & "
    > " & tempcolor
    > End If
    >
    > If (k + 5) <= totopr Then
    > tempopr = Right("00" & k + 5, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    >
    > If (k + 6) <= totopr Then
    > tempopr = Right("00" & k + 6, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempjob & " "
    > Else
    > strop = strop & "
    > " & tempjob
    > End If
    >
    > If (k + 7) <= totopr Then
    > tempopr = Right("00" & k + 7, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > Next
    > bdlno = bdlno + 1
    > rowcounter = 1
    > Next
    > Next
    >
    >
    > The first loop may be having 5 iterations(0 to 5)
    > Second - (0 to 20)
    > third may be (1 to 52)
    >
    > Its taking so much time to produce the final output(nearly 5 mts). I got

    an
    > error initially "Script timeout". I have set the value to 180
    > "server.scripttimeout=180" Now its ok. But taking some long time to

    display
    > output. Even in the server itself.
    >
    > Some times the first loop may be 0 to 12
    >
    > Is my coding is wrong? or any other sollution is there to get the fast
    > output for this?
    >
    > Pls help me. After executing i am saving the output(strop) in a text file
    > using FSO(that my need).
    >
    > Thanks in advance.
    >
    > The output could be liek this
    >
    > http://m.1asphost.com/tsimsha/tickets.txt
    >
    >
    >
     
    io, Jan 5, 2005
    #2
    1. Advertising

  3. Rajani

    Rajani Guest

    Hello,

    Many thanx for u r reply. I didnt get you clearly. Can u guide me with my
    code? what i have to delete and modify?

    Thanx again


    "io" wrote:

    > G'day Rajani,
    >
    > There is nothing wrong with your code. The killer most likely is string
    > management routines, namely, memory allocation routines that manage string
    > concatenations. I suggest you modify your code so that you accumulate the
    > output into array(s) and then use JOIN() to produce the final output string.
    > Have a look at the very basic code below - it should give you an idea what I
    > mean:
    >
    > dim i, sTemp, aOut(), sOut
    >
    > for i = 0 to 1000000
    > sTemp = <your code>
    > ReDim Preserve aOut(i)
    > aOut(i) = sTemp
    > next
    >
    > sOut = Join(aOut, <delimeter>)
    >
    > Cheers
    >
     
    Rajani, Jan 5, 2005
    #3
  4. Rajani

    io Guest

    It just occured to me that you may be better off writing directly to a
    file - eliminates concatatenation and you need file output anyway.
    Try the following:


    dim fs, a

    Set fs = CreateObject("Scripting.FileSystemObject")
    Set a = fs.CreateTextFile("c:\testfile.txt", True)

    For i = 0 To UBound(arrResSizes) - 1
    For j = 0 To UBound(arrqty) - 1
    For k = 1 To totopr Step 8
    tempjob = right(jc,5)
    tempsize = left(arrResSizes(i) & " ", 3)
    headsize = left(arrResSizes(i) & " ", 6)
    tempqty = Right(" " & CStr(arrqty(j)), 2)
    templay = Right(" " & CStr(lno), 3)
    tempbdl = Right(" " & bdlno, 5)
    tempopr = Right("00" & k, 2)
    'tempcolor = Left(getColorName(arrColorCodes(j)) & " ", 6)
    tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & " ",6)
    a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    headsize & " ")
    If (k + 1) <= totopr Then
    tempopr = Right("00" & k + 1, 2)
    a.Write(tempopr & " " & tempjob & " " & tempsize & " "
    & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf & vbcrlf
    & vbcrlf)
    Else
    a.Write(vbcrlf & vbcrlf & vbcrlf)
    End If
    If (k + 2) <= totopr Then
    tempopr = Right("00" & k + 2, 2)
    a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    tempqty & " PCS" & " ")
    Else
    a.Write(" " & tempqty &
    " PCS ")
    End If

    If (k + 3) <= totopr Then
    tempopr = Right("00" & k + 3, 2)
    a.Write(tempopr & " " & tempjob & " " & tempsize & " "
    & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf & vbcrlf
    & vbcrlf)
    Else
    a.Write(vbcrlf & vbcrlf & vbcrlf)
    End If
    If (k + 4) <= totopr Then
    tempopr = Right("00" & k + 4, 2)
    a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    tempcolor & " ")
    Else
    a.Write(" " &
    tempcolor)
    End If

    If (k + 5) <= totopr Then
    tempopr = Right("00" & k + 5, 2)
    a.Write(tempopr & " " & tempjob & " " & tempsize & " "
    & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf & vbcrlf
    & vbcrlf)
    Else
    a.Write(vbcrlf & vbcrlf & vbcrlf)
    End If

    If (k + 6) <= totopr Then
    tempopr = Right("00" & k + 6, 2)
    a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    tempjob & " ")
    Else
    a.Write(" " & tempjob)
    End If

    If (k + 7) <= totopr Then
    tempopr = Right("00" & k + 7, 2)
    a.Write(tempopr & " " & tempjob & " " & tempsize & " "
    & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf & vbcrlf
    & vbcrlf)
    Else
    a.Write(vbcrlf & vbcrlf & vbcrlf)
    End If
    Next
    bdlno = bdlno + 1
    rowcounter = 1
    Next
    Next

    a.Close

    Cheers


    "Rajani" <> wrote in message
    news:...
    >
    > Hello,
    >
    > Many thanx for u r reply. I didnt get you clearly. Can u guide me with

    my
    > code? what i have to delete and modify?
    >
    > Thanx again
    >
    >
    > "io" wrote:
    >
    > > G'day Rajani,
    > >
    > > There is nothing wrong with your code. The killer most likely is string
    > > management routines, namely, memory allocation routines that manage

    string
    > > concatenations. I suggest you modify your code so that you accumulate

    the
    > > output into array(s) and then use JOIN() to produce the final output

    string.
    > > Have a look at the very basic code below - it should give you an idea

    what I
    > > mean:
    > >
    > > dim i, sTemp, aOut(), sOut
    > >
    > > for i = 0 to 1000000
    > > sTemp = <your code>
    > > ReDim Preserve aOut(i)
    > > aOut(i) = sTemp
    > > next
    > >
    > > sOut = Join(aOut, <delimeter>)
    > >
    > > Cheers
    > >

    >
     
    io, Jan 5, 2005
    #4
  5. One possibility for performance is to put all that logic into a compiled
    object (e.g. VB6 COM DLL). It may perform much faster.

    One possibility to give feedback to your users is to set Reponse.Buffer =
    False and Server.ScriptTimeout = 0.

    Then in various places in your code, write out status messages so that users
    know it's still working, like

    Response.Write "Still processing..." & string(1000, " ")
    Response.Flush

    I added the string(1000, " ") b/c I've had issues w/ the response not
    getting flushed if not enough new data was added. *shrug*

    --
    Ben Strackany
    www.developmentnow.com


    "Rajani" <> wrote in message
    news:D...
    > Hello,
    >
    > First of all sorry for the long code. But i want to explain clearly what

    i
    > am doing.
    >
    > For i = 0 To UBound(arrResSizes) - 1
    > For j = 0 To UBound(arrqty) - 1
    > For k = 1 To totopr Step 8
    > tempjob = right(jc,5)
    > tempsize = left(arrResSizes(i) & " ", 3)
    > headsize = left(arrResSizes(i) & " ", 6)
    > tempqty = Right(" " & CStr(arrqty(j)), 2)
    > templay = Right(" " & CStr(lno), 3)
    > tempbdl = Right(" " & bdlno, 5)
    > tempopr = Right("00" & k, 2)
    > 'tempcolor = Left(getColorName(arrColorCodes(j)) & "
    > ", 6)
    > tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "
    > ",6)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & headsize & " "
    > If (k + 1) <= totopr Then
    > tempopr = Right("00" & k + 1, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > If (k + 2) <= totopr Then
    > tempopr = Right("00" & k + 2, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempqty & " PCS" & " "
    > Else
    > strop = strop & "
    > " & tempqty & " PCS "
    > End If
    >
    > If (k + 3) <= totopr Then
    > tempopr = Right("00" & k + 3, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > If (k + 4) <= totopr Then
    > tempopr = Right("00" & k + 4, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempcolor & " "
    > Else
    > strop = strop & "
    > " & tempcolor
    > End If
    >
    > If (k + 5) <= totopr Then
    > tempopr = Right("00" & k + 5, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    >
    > If (k + 6) <= totopr Then
    > tempopr = Right("00" & k + 6, 2)
    > strop = strop & tempjob & " " & tempsize & " " &
    > tempqty & " " & templay & " " & tempbdl & " " & tempopr & " " &

    tempopr
    > & " " & tempjob & " "
    > Else
    > strop = strop & "
    > " & tempjob
    > End If
    >
    > If (k + 7) <= totopr Then
    > tempopr = Right("00" & k + 7, 2)
    > strop = strop & tempopr & " " & tempjob & " "

    &
    > tempsize & " " & tempqty & " " & templay & " " & tempbdl & " " & tempopr &
    > vbcrlf & vbcrlf & vbcrlf
    > Else
    > strop = strop & vbcrlf & vbcrlf & vbcrlf
    > End If
    > Next
    > bdlno = bdlno + 1
    > rowcounter = 1
    > Next
    > Next
    >
    >
    > The first loop may be having 5 iterations(0 to 5)
    > Second - (0 to 20)
    > third may be (1 to 52)
    >
    > Its taking so much time to produce the final output(nearly 5 mts). I got

    an
    > error initially "Script timeout". I have set the value to 180
    > "server.scripttimeout=180" Now its ok. But taking some long time to

    display
    > output. Even in the server itself.
    >
    > Some times the first loop may be 0 to 12
    >
    > Is my coding is wrong? or any other sollution is there to get the fast
    > output for this?
    >
    > Pls help me. After executing i am saving the output(strop) in a text file
    > using FSO(that my need).
    >
    > Thanks in advance.
    >
    > The output could be liek this
    >
    > http://m.1asphost.com/tsimsha/tickets.txt
    >
    >
    >
     
    Ben Strackany, Jan 5, 2005
    #5
  6. Rajani

    io Guest

    How did you go with this?

    > Try the following:
    >
    >
    > dim fs, a
    >
    > Set fs = CreateObject("Scripting.FileSystemObject")
    > Set a = fs.CreateTextFile("c:\testfile.txt", True)
    >
    > For i = 0 To UBound(arrResSizes) - 1
    > For j = 0 To UBound(arrqty) - 1
    > For k = 1 To totopr Step 8
    > tempjob = right(jc,5)
    > tempsize = left(arrResSizes(i) & " ", 3)
    > headsize = left(arrResSizes(i) & " ", 6)
    > tempqty = Right(" " & CStr(arrqty(j)), 2)
    > templay = Right(" " & CStr(lno), 3)
    > tempbdl = Right(" " & bdlno, 5)
    > tempopr = Right("00" & k, 2)
    > 'tempcolor = Left(getColorName(arrColorCodes(j)) & " ",

    6)
    > tempcolor=left(dict.Item(cstr(arrColorCodes(j))) & "

    ",6)
    > a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    > templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    > headsize & " ")
    > If (k + 1) <= totopr Then
    > tempopr = Right("00" & k + 1, 2)
    > a.Write(tempopr & " " & tempjob & " " & tempsize & "

    "
    > & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf &

    vbcrlf
    > & vbcrlf)
    > Else
    > a.Write(vbcrlf & vbcrlf & vbcrlf)
    > End If
    > If (k + 2) <= totopr Then
    > tempopr = Right("00" & k + 2, 2)
    > a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    > templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    > tempqty & " PCS" & " ")
    > Else
    > a.Write(" " & tempqty

    &
    > " PCS ")
    > End If
    >
    > If (k + 3) <= totopr Then
    > tempopr = Right("00" & k + 3, 2)
    > a.Write(tempopr & " " & tempjob & " " & tempsize & "

    "
    > & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf &

    vbcrlf
    > & vbcrlf)
    > Else
    > a.Write(vbcrlf & vbcrlf & vbcrlf)
    > End If
    > If (k + 4) <= totopr Then
    > tempopr = Right("00" & k + 4, 2)
    > a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    > templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    > tempcolor & " ")
    > Else
    > a.Write(" " &
    > tempcolor)
    > End If
    >
    > If (k + 5) <= totopr Then
    > tempopr = Right("00" & k + 5, 2)
    > a.Write(tempopr & " " & tempjob & " " & tempsize & "

    "
    > & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf &

    vbcrlf
    > & vbcrlf)
    > Else
    > a.Write(vbcrlf & vbcrlf & vbcrlf)
    > End If
    >
    > If (k + 6) <= totopr Then
    > tempopr = Right("00" & k + 6, 2)
    > a.Write(tempjob & " " & tempsize & " " & tempqty & " " &
    > templay & " " & tempbdl & " " & tempopr & " " & tempopr & " " &
    > tempjob & " ")
    > Else
    > a.Write(" " &

    tempjob)
    > End If
    >
    > If (k + 7) <= totopr Then
    > tempopr = Right("00" & k + 7, 2)
    > a.Write(tempopr & " " & tempjob & " " & tempsize & "

    "
    > & tempqty & " " & templay & " " & tempbdl & " " & tempopr & vbcrlf &

    vbcrlf
    > & vbcrlf)
    > Else
    > a.Write(vbcrlf & vbcrlf & vbcrlf)
    > End If
    > Next
    > bdlno = bdlno + 1
    > rowcounter = 1
    > Next
    > Next
    >
    > a.Close
    >
    > Cheers
    >
    >
    > "Rajani" <> wrote in message
    > news:...
    > >
    > > Hello,
    > >
    > > Many thanx for u r reply. I didnt get you clearly. Can u guide me with

    > my
    > > code? what i have to delete and modify?
    > >
    > > Thanx again
    > >
    > >
    > > "io" wrote:
    > >
    > > > G'day Rajani,
    > > >
    > > > There is nothing wrong with your code. The killer most likely is

    string
    > > > management routines, namely, memory allocation routines that manage

    > string
    > > > concatenations. I suggest you modify your code so that you accumulate

    > the
    > > > output into array(s) and then use JOIN() to produce the final output

    > string.
    > > > Have a look at the very basic code below - it should give you an idea

    > what I
    > > > mean:
    > > >
    > > > dim i, sTemp, aOut(), sOut
    > > >
    > > > for i = 0 to 1000000
    > > > sTemp = <your code>
    > > > ReDim Preserve aOut(i)
    > > > aOut(i) = sTemp
    > > > next
    > > >
    > > > sOut = Join(aOut, <delimeter>)
    > > >
    > > > Cheers
    > > >

    > >

    >
    >
     
    io, Jan 6, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    708
    Eric Sosman
    Jul 8, 2003
  2. John Nagle
    Replies:
    0
    Views:
    509
    John Nagle
    Jan 3, 2008
  3. Stupid48
    Replies:
    6
    Views:
    156
    Ken Schaefer
    Mar 18, 2005
  4. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,312
    Brian Candler
    Oct 6, 2004
  5. Isaac Won
    Replies:
    9
    Views:
    405
    Ulrich Eckhardt
    Mar 4, 2013
Loading...

Share This Page