Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Option Value Out Of Range

2 posts in General Discussion Last posting was on 2009-12-04 21:51:10.0Z
RobertDD Posted on 2009-12-04 20:22:12.0Z
Sender: 6fb8.4b16875f.1804289383@sybase.com
From: RobertDD
Newsgroups: ianywhere.public.general
Subject: Option Value Out Of Range
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b196f74.6ca3.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Dec 2009 12:22:12 -0800
X-Trace: forums-1-dub 1259958132 10.22.241.41 (4 Dec 2009 12:22:12 -0800)
X-Original-Trace: 4 Dec 2009 12:22:12 -0800, 10.22.241.41
Lines: 23
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7813
Article PK: 6851

I am updating an old database from SQL Anywhere 5.5 to 11. I
use Delphi applications with ODBC98 components to talk to a
SQL Anywhere server.

In SQL 5.5 I would open a "live query" and update records in
the result set (this method uses the SQLSetPos ODBC function
with parameters SQL_UPDATE and SQL_LOCK_NO_CHANGE, but this
actual implementation is hidden). This was not a problem in
5.5, even when the query I was updating was a view or a join
involving multiple tables. In SQL Anywhere 11 I get the
error "Option Value Out Of Range" when the updated query
involves multiple tables, which (I think) indicates that the
dataset I am trying to update is read only.

I have two questions:
1. Is there a way around this?
2. What was the last version of SQL Anywhere in which these
kinds of updates used to work?

I understand that these live queries are not the way to do
this, but I am dealing with legacy code and this technique
is too widely used throughout the code and too integrated
into its foundation to easily replace it.


Glenn Paulley [Sybase iAnywhere] Posted on 2009-12-04 21:51:10.0Z
From: "Glenn Paulley [Sybase iAnywhere]" <paulley@ianywhere.com>
Reply-To: paulley@ianywhere.com
Organization: Sybase iAnywhere
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Option Value Out Of Range
References: <4b196f74.6ca3.1681692777@sybase.com>
In-Reply-To: <4b196f74.6ca3.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b19844e@forums-1-dub>
Date: 4 Dec 2009 13:51:10 -0800
X-Trace: forums-1-dub 1259963470 10.22.241.152 (4 Dec 2009 13:51:10 -0800)
X-Original-Trace: 4 Dec 2009 13:51:10 -0800, vip152.sybase.com
Lines: 48
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7814
Article PK: 6849

Try setting the connection option "ANSI_UPDATE_CONSTRAINTS" to OFF and
see if that corrects the problem.

Glenn

RobertDD wrote:
> I am updating an old database from SQL Anywhere 5.5 to 11. I
> use Delphi applications with ODBC98 components to talk to a
> SQL Anywhere server.
>
> In SQL 5.5 I would open a "live query" and update records in
> the result set (this method uses the SQLSetPos ODBC function
> with parameters SQL_UPDATE and SQL_LOCK_NO_CHANGE, but this
> actual implementation is hidden). This was not a problem in
> 5.5, even when the query I was updating was a view or a join
> involving multiple tables. In SQL Anywhere 11 I get the
> error "Option Value Out Of Range" when the updated query
> involves multiple tables, which (I think) indicates that the
> dataset I am trying to update is read only.
>
> I have two questions:
> 1. Is there a way around this?
> 2. What was the last version of SQL Anywhere in which these
> kinds of updates used to work?
>
> I understand that these live queries are not the way to do
> this, but I am dealing with legacy code and this technique
> is too widely used throughout the code and too integrated
> into its foundation to easily replace it.

--
Glenn Paulley
Director, Engineering (Query Processing)
Sybase iAnywhere

Blog: http://iablog.sybase.com/paulley

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://case-express.sybase.com

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the
Sybase iAnywhere pages at
http://www.sybase.com/products/databasemanagement/sqlanywhere/technicalsupport