Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I'm using the ASA 9.02.3951. I'm trying to run a select where the main table has 4301599 lines and within a certain period. And it is with the error "Out of memory". In Interactive SQL and in my Delphi application. I use BDE. alt text

If anyone can help me. Thank you.

asked 25 Feb '15, 09:40

Walmir%20Taques's gravatar image

Walmir Taques
accept rate: 12%

edited 25 Feb '15, 10:39

Justin%20Willey's gravatar image

Justin Willey

Try changing the query to SELECT COUNT(*) FROM. If that works, then the problem may be that ISQL simply cannot display all the data.

(25 Feb '15, 12:48) Breck Carter
Replies hidden

Really, when I "SELECT COUNT (*) FROM" there is a small delay, but the result is shown. But what can I do to show all the data? In my Delphi application also demonstrates this error. How can I fix? Is there any configuration to be done in the BDE or database?

(25 Feb '15, 12:54) Walmir Taques

How much data are you expecting to show?

(25 Feb '15, 13:24) Breck Carter

Approximately 70.000 lines

(25 Feb '15, 13:46) Walmir Taques

For the start, throw away BDE. This crap is obsolete by 10+ years.

(26 Feb '15, 02:55) Dmitri

That might be too much for the V9 edition of ISQL to display. A later version of ISQL might work; for example the V16 version of ISQL connects OK to a V9 database.

Also... are you really expecting to work with 70,000 rows in a single display? Perhaps SELECT TOP xx START AT yy ... ORDER BY will help.

(27 Feb '15, 08:14) Breck Carter

FWIW SQL Anywhere is 10+ years old and it definitely is not crap, so age is not a determinant :)

(27 Feb '15, 08:15) Breck Carter

At least v9 has the "START AT" clause - v8 had not had that:)

(27 Feb '15, 09:03) Volker Barth

Problem is, BDE is intended for local databases (dBase, Paradox, etc.) in the first place. Also, it was not updated for years, so it has numerous compatibility issues with newer (Vista and up) Windows versions. It is not age, it is obsolescence that counts. There exist much better ways to connect Delphi and SA :).

(02 Mar '15, 09:06) Dmitri
showing 1 of 9 show all flat view

Interactive SQL in 9.0.2 was limited to the default size of Java heap memory, and was limited to a 32-bit process size in total (which is ~1.6 GB on 32-bit Windows, ~3.6GB on 64-bit Windows). Breck's suggestion of using a later version of Interactive SQL would likely help - version 12 and higher uses 1000m as the default heap size.

In version 9, you can try and adjust the Java heap size using the Interactive SQL batch file and see if you can work around this limitation:

  1. Run dbisql -batch - this should produce a file isqlj.bat in the current directory.
  2. Open the batch file in a text editor. Add the following text after 'java.exe':


  3. Run Interactive SQL via the isqlj.bat batch file and try your query again.

permanent link

answered 05 Mar '15, 14:01

Jeff%20Albion's gravatar image

Jeff Albion
accept rate: 25%

edited 09 Mar '15, 08:55

Not performed. Is presenting the following error message.

Microsoft Windows [versão 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Todos os direitos reservados.

C:\Program Files\Sybase\SQL Anywhere 9\win32>isqlj

C:\Program Files\Sybase\SQL Anywhere 9\win32>C:\PROGRA~1\Sybase\Shared\Sun\jre14
2\bin\java.exe -Dsun.java2d.noddraw=true -Dsun.java2d.d3d=false -Dsqlpath= -Dpat
PROGRA~1\Sybase\Shared\win32;C:\PROGRA~1\Sybase\Shared\SYBASE~1.3\win32 -Disql.h
elpFolder=C:\PROGRA~1\Sybase\SQLANY~1\java -Dasa.location=C:\PROGRA~1\Sybase\SQL
ANY~1\ -Dsybase.jsyblib.dll.location=C:\PROGRA~1\Sybase\Shared\win32\
mandShell="C:\Windows\SysWOW64\cmd.exe /c"  -classpath C:\PROGRA~1\Sybase\SQLANY
QLANY~1\java\xerces.jar;C:\PROGRA~1\Sybase\SQLANY~1\java\xml4j.jar; sybase.isql.
isql -locale en -Xmx1400m
Error! Unknown command line option "-Xmx1400m"
Adaptive Server Anywhere Interactive SQL Version
Usage: DBISQL [options] [sqlCommand|commandFileName]

    -c "keyword=value;..."        Database connection parameters
    -codepage <codepage>          Use this codepage when reading/writing files
    -d "delimiter"                Use the given string as the command delimiter
    -d1                           Print statements as they are executed
                                    (command-line mode only)
    -dataSource <DSN>             ODBC data source name
    -f <filename>                 Open the given file for editing
    -host <address>               Network address of the database server
    -jConnect                     Connect using jConnect
    -nogui                        Run in command-line mode
    -ODBC                         Connect using ODBC (default)
    -onerror {continue|exit}      Override ON_ERROR option for all users
    -port <portNumber>            TCP/IP port number of the database server
    -q                            Suppress non-critical messages
    -x                            Check SQL syntax but do not execute

C:\Program Files\Sybase\SQL Anywhere 9\win32>
(06 Mar '15, 12:55) Walmir Taques
Replies hidden
Comment Text Removed

My apologies - the instructions should say to add the "-Xmx 1400m" switch just after "java.exe" - it's a switch to the JVM.

(09 Mar '15, 08:54) Jeff Albion
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Feb '15, 09:40

question was seen: 5,124 times

last updated: 09 Mar '15, 08:55