[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Out of Memory error



Julie,

1. Why you don't use :
        print $printtext        (+1,#ppos) wrap #wpos 5000 ON=<13>
    The ON does what you do in your code.

2. I Think that this line may cause the problem:
          let $ldtext_print = substr($ldtext_print, #found + 2,
                                         length($ldtext_print) - #found)
   Try split it :
           let $temp         = substr($ldtext_print, #found + 2,
                                         length($ldtext_print) - #found)
          move $temp to $ldtext_print


3. By the way, in SQR V4.2 you have new function : wrapdepth,
    that return the number of lines of the print wrap command will use !

Arnon
-------------------------------------------------------------------
SEMECH SOFTWARE MARKETING LTD.
TEL : (972) - 3 - 5333144
FAX : (972) - 3 - 5333132
Email: <semech@pobox.com>
------------------------------------------------------------------
-----Original Message-----
From: Julie Waggoner <WAGGO000@MAIL.GENMILLS.COM>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Date: 06/08/98 15:54
Subject: Out of Memory error


>Hello,
>
>I'm getting an out of memory error when I run a report and was hoping
>someone out there might be able to help.  The report works fine normally
>but I run into problems when the report tries and processes a large
>string.  I am passing a field from the database that can be up to 32,000
>characters long into a string and running through the print routine
>below to search for the carriage-return character chr(13), print the
>text up until the carriage-return and then search for it again in order
>to format the printed output in the same way the user has input the
>data.
>
>begin-procedure print_long_description ($ldtext, #ppos, #wpos)
>        let $ldtext_print = $ldtext
>        let #found = instr($ldtext_print, chr(13), 0)
>        While #found > 0
>                let $printtext = substr($ldtext_print, 1, #found - 1)
>                let $ldtext_print = substr($ldtext_print, #found + 2,
>length($ldtext_print) - #found)
>                print $printtext        (+1,#ppos) wrap #wpos 5000
>                let #found = instr($ldtext_print, chr(13), 1)
>        End-While
>                print $ldtext_print     (+1,#ppos) wrap #wpos 5000
>end-procedure ! print_long_description
>
>The data that is causing the error has a field that is 22,217 characters
>long.
>I am working with Workbench for Windows 95/NT and going against an
>Oracle8 database.  Any thoughts on how I can get rid of the out of
>memory error?  Are there any SQR settings for strings that I should look
>at and modify?
>
>Thanks,
>Julie Waggoner
>