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.

Update a table on a remote server MS Sql

5 posts in General Discussion Last posting was on 2006-05-29 14:17:09.0Z
Canelas Posted on 2006-05-27 11:25:05.0Z
From: Canelas <canelas@consulsis.pt>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Update a table on a remote server MS Sql
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.193.65.82
X-Original-NNTP-Posting-Host: 81.193.65.82
Message-ID: <44783711$1@forums-1-dub>
Date: 27 May 2006 04:25:05 -0700
X-Trace: forums-1-dub 1148729105 81.193.65.82 (27 May 2006 04:25:05 -0700)
X-Original-Trace: 27 May 2006 04:25:05 -0700, 81.193.65.82
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5396
Article PK: 1446

Hi,
I'm using ASA 9.0.1.1751, and I have a remote server on MS Sql Server,
the problem is that I can insert a new record in a remote table, but
them I can't updated, it returns an error : 'Update operation attempted
on non-updatable remote query' SQLCODE=-728.
How can i solve this problem ? To update from the remote table to a
table in local DB I create a temporary table with the values I want to
update, but to update in the other direction I don't know how to do it.

Any help on this problem would be greatly appreciated.


Breck Carter [Team iAnywhere] Posted on 2006-05-27 11:46:14.0Z
From: "Breck Carter [Team iAnywhere]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: Update a table on a remote server MS Sql
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <oreg72tljgaava1o0at2i3irv1bcdhcvd7@4ax.com>
References: <44783711$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 27 May 2006 04:46:14 -0700
X-Trace: forums-1-dub 1148730374 64.7.134.118 (27 May 2006 04:46:14 -0700)
X-Original-Trace: 27 May 2006 04:46:14 -0700, bcarter.sentex.ca
Lines: 23
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5397
Article PK: 1447

Please show us the exact SQL you're using to try to update the remote
table.

On 27 May 2006 04:25:05 -0700, Canelas <canelas@consulsis.pt> wrote:

>Hi,
>I'm using ASA 9.0.1.1751, and I have a remote server on MS Sql Server,
>the problem is that I can insert a new record in a remote table, but
>them I can't updated, it returns an error : 'Update operation attempted
>on non-updatable remote query' SQLCODE=-728.
>How can i solve this problem ? To update from the remote table to a
>table in local DB I create a temporary table with the values I want to
>update, but to update in the other direction I don't know how to do it.
>
>Any help on this problem would be greatly appreciated.

--
Breck Carter [Team iAnywhere]
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
breck.carter@risingroad.com


Canelas Posted on 2006-05-29 10:56:52.0Z
From: Canelas <canelas@consulsis.pt>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Update a table on a remote server MS Sql
References: <44783711$1@forums-1-dub> <oreg72tljgaava1o0at2i3irv1bcdhcvd7@4ax.com>
In-Reply-To: <oreg72tljgaava1o0at2i3irv1bcdhcvd7@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bl5-66-246.dsl.telepac.pt
X-Original-NNTP-Posting-Host: bl5-66-246.dsl.telepac.pt
Message-ID: <447ad374@forums-1-dub>
Date: 29 May 2006 03:56:52 -0700
X-Trace: forums-1-dub 1148900212 82.154.66.246 (29 May 2006 03:56:52 -0700)
X-Original-Trace: 29 May 2006 03:56:52 -0700, bl5-66-246.dsl.telepac.pt
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5399
Article PK: 1450

Hi Carter,
Thanks for Your interest.
Well the update expression is something like this :

Update LocalTable, RemoteTable Set
RemoteTable.ColumnY=LocalTable.ColumnX where
RemoteTable.ColumnPK=LocalTable.ColumnPK



Breck Carter [Team iAnywhere] escreveu:

> Please show us the exact SQL you're using to try to update the remote
> table.
>
>
> On 27 May 2006 04:25:05 -0700, Canelas <canelas@consulsis.pt> wrote:
>
>> Hi,
>> I'm using ASA 9.0.1.1751, and I have a remote server on MS Sql Server,
>> the problem is that I can insert a new record in a remote table, but
>> them I can't updated, it returns an error : 'Update operation attempted
>> on non-updatable remote query' SQLCODE=-728.
>> How can i solve this problem ? To update from the remote table to a
>> table in local DB I create a temporary table with the values I want to
>> update, but to update in the other direction I don't know how to do it.
>>
>> Any help on this problem would be greatly appreciated.
>
> --
> Breck Carter [Team iAnywhere]
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
> The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
> breck.carter@risingroad.com


Breck Carter [Team iAnywhere] Posted on 2006-05-29 12:26:04.0Z
From: "Breck Carter [Team iAnywhere]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: Update a table on a remote server MS Sql
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <nqpl7258a8fum8u6nbnqa3cbqaqeir2olj@4ax.com>
References: <44783711$1@forums-1-dub> <oreg72tljgaava1o0at2i3irv1bcdhcvd7@4ax.com> <447ad374@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 29 May 2006 05:26:04 -0700
X-Trace: forums-1-dub 1148905564 64.7.134.118 (29 May 2006 05:26:04 -0700)
X-Original-Trace: 29 May 2006 05:26:04 -0700, bcarter.sentex.ca
Lines: 61
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5400
Article PK: 1449

That operation is not supported (yet? :)

You can use a cursor FOR loop as a workaround; for example, t is the
local table, and proxy_t points to an MSS table:

FOR f_fetch AS c_fetch NO SCROLL CURSOR FOR
SELECT t.pkey AS @pkey,
t.data AS @data
FROM t
FOR READ ONLY
DO
UPDATE proxy_t
SET proxy_t.data = @data
WHERE proxy_t.pkey = @pkey;
END FOR;

Breck

On 29 May 2006 03:56:52 -0700, Canelas <canelas@consulsis.pt> wrote:

>Hi Carter,
>Thanks for Your interest.
>Well the update expression is something like this :
>
>Update LocalTable, RemoteTable Set
>RemoteTable.ColumnY=LocalTable.ColumnX where
>RemoteTable.ColumnPK=LocalTable.ColumnPK
>
>
>
>Breck Carter [Team iAnywhere] escreveu:
>> Please show us the exact SQL you're using to try to update the remote
>> table.
>>
>>
>> On 27 May 2006 04:25:05 -0700, Canelas <canelas@consulsis.pt> wrote:
>>
>>> Hi,
>>> I'm using ASA 9.0.1.1751, and I have a remote server on MS Sql Server,
>>> the problem is that I can insert a new record in a remote table, but
>>> them I can't updated, it returns an error : 'Update operation attempted
>>> on non-updatable remote query' SQLCODE=-728.
>>> How can i solve this problem ? To update from the remote table to a
>>> table in local DB I create a temporary table with the values I want to
>>> update, but to update in the other direction I don't know how to do it.
>>>
>>> Any help on this problem would be greatly appreciated.
>>
>> --
>> Breck Carter [Team iAnywhere]
>> RisingRoad SQL Anywhere and MobiLink Professional Services
>> www.risingroad.com
>> The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
>> breck.carter@risingroad.com

--
Breck Carter [Team iAnywhere]
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
breck.carter@risingroad.com


Canelas Posted on 2006-05-29 14:17:09.0Z
From: Canelas <canelas@consulsis.pt>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: Update a table on a remote server MS Sql
References: <44783711$1@forums-1-dub> <oreg72tljgaava1o0at2i3irv1bcdhcvd7@4ax.com> <447ad374@forums-1-dub> <nqpl7258a8fum8u6nbnqa3cbqaqeir2olj@4ax.com>
In-Reply-To: <nqpl7258a8fum8u6nbnqa3cbqaqeir2olj@4ax.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bl5-66-126.dsl.telepac.pt
X-Original-NNTP-Posting-Host: bl5-66-126.dsl.telepac.pt
Message-ID: <447b0265@forums-1-dub>
Date: 29 May 2006 07:17:09 -0700
X-Trace: forums-1-dub 1148912229 82.154.66.126 (29 May 2006 07:17:09 -0700)
X-Original-Trace: 29 May 2006 07:17:09 -0700, bl5-66-126.dsl.telepac.pt
Lines: 64
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5401
Article PK: 1451

Thanks for your help.


Breck Carter [Team iAnywhere] escreveu:

> That operation is not supported (yet? :)
>
> You can use a cursor FOR loop as a workaround; for example, t is the
> local table, and proxy_t points to an MSS table:
>
> FOR f_fetch AS c_fetch NO SCROLL CURSOR FOR
> SELECT t.pkey AS @pkey,
> t.data AS @data
> FROM t
> FOR READ ONLY
> DO
> UPDATE proxy_t
> SET proxy_t.data = @data
> WHERE proxy_t.pkey = @pkey;
> END FOR;
>
> Breck
>
> On 29 May 2006 03:56:52 -0700, Canelas <canelas@consulsis.pt> wrote:
>
>> Hi Carter,
>> Thanks for Your interest.
>> Well the update expression is something like this :
>>
>> Update LocalTable, RemoteTable Set
>> RemoteTable.ColumnY=LocalTable.ColumnX where
>> RemoteTable.ColumnPK=LocalTable.ColumnPK
>>
>>
>>
>> Breck Carter [Team iAnywhere] escreveu:
>>> Please show us the exact SQL you're using to try to update the remote
>>> table.
>>>
>>>
>>> On 27 May 2006 04:25:05 -0700, Canelas <canelas@consulsis.pt> wrote:
>>>
>>>> Hi,
>>>> I'm using ASA 9.0.1.1751, and I have a remote server on MS Sql Server,
>>>> the problem is that I can insert a new record in a remote table, but
>>>> them I can't updated, it returns an error : 'Update operation attempted
>>>> on non-updatable remote query' SQLCODE=-728.
>>>> How can i solve this problem ? To update from the remote table to a
>>>> table in local DB I create a temporary table with the values I want to
>>>> update, but to update in the other direction I don't know how to do it.
>>>>
>>>> Any help on this problem would be greatly appreciated.
>>> --
>>> Breck Carter [Team iAnywhere]
>>> RisingRoad SQL Anywhere and MobiLink Professional Services
>>> www.risingroad.com
>>> The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
>>> breck.carter@risingroad.com
>
> --
> Breck Carter [Team iAnywhere]
> RisingRoad SQL Anywhere and MobiLink Professional Services
> www.risingroad.com
> The book: http://www.risingroad.com/SQL_Anywhere_Studio_9_Developers_Guide.html
> breck.carter@risingroad.com