Home > Archive > SQL Anywhere Mobile > May 2005 > synchronization after correcting a mispelled synchronized table name









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author synchronization after correcting a mispelled synchronized table name
Chris Werner

2005-05-26, 7:24 am

Hi,

I've mispelled a synchronized table name on a ML server installation
and got the warning 10024. The table is not synchronized now of course
(have scripts for download_cursor and upload_insert). After correcting
the error only further changes will be synchronized. Any options
to synchronize all changes? (ASA 9.0.2 2451)

TIA

Chris Werner


Reg Domaratzki \(iAnywhere Solutions\)

2005-05-26, 8:24 pm

It's a little clumsy, but what if you created a table that lists who has
done a full download :

create table hack_t1 (
mluser varchar(128) primary key,
full tinyint default 0
);
insert into hack_t1 select "name",0 from ml_user;

Now, change your download_cursor for table t1 to stored procedure :

create procedure hack_sp_t1( in @last_download timestamp, in @mluser
varchar(128) )
begin
declare @done_full tinyint;
select full into @done_full from hack_t1 where mluser = @mluser;
if @done_full = 1 or @done_full is NULL then
// if 1 then already done, if NULL, new user that was created
// since hack_t1 was populated
select pkey,c1 from t1 where last_modified > @last_download
else
update hack_t1 set full = 1 where mluser = @mluser;
select pkey,c1 from t1;
end if;
end;

call ml_add_table_script(
'v1', 't1', 'download_cursor', 'call hack_sp_t1(
?, ? )' );

Once all the zero values are gone from the hack_t1 table, you can put your
download_cursor back to the way it should be.

I did warn you it was clumsy, but it should work. Note that I haven't
checked my code for syntax, but you should get the general idea.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Chris Werner" <cw& #123;please_no_spam}
ATf-s.de> wrote in message
news:4295b1a5$1@foru
ms-2-dub...
> Hi,
>
> I've mispelled a synchronized table name on a ML server installation
> and got the warning 10024. The table is not synchronized now of course
> (have scripts for download_cursor and upload_insert). After correcting
> the error only further changes will be synchronized. Any options
> to synchronize all changes? (ASA 9.0.2 2451)
>
> TIA
>
> Chris Werner
>
>



Chris Werner

2005-05-27, 3:24 am

Thanks Reg for you detailed explanation. I'll
try going this way.

Chris Werner

"Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com>
schrieb im Newsbeitrag news:42963b75$1@foru
ms-2-dub...
> It's a little clumsy, but what if you created a table that lists who has
> done a full download :
>
> create table hack_t1 (
> mluser varchar(128) primary key,
> full tinyint default 0
> );
> insert into hack_t1 select "name",0 from ml_user;
>
> Now, change your download_cursor for table t1 to stored procedure :
>
> create procedure hack_sp_t1( in @last_download timestamp, in @mluser
> varchar(128) )
> begin
> declare @done_full tinyint;
> select full into @done_full from hack_t1 where mluser = @mluser;
> if @done_full = 1 or @done_full is NULL then
> // if 1 then already done, if NULL, new user that was created
> // since hack_t1 was populated
> select pkey,c1 from t1 where last_modified > @last_download
> else
> update hack_t1 set full = 1 where mluser = @mluser;
> select pkey,c1 from t1;
> end if;
> end;
>
> call ml_add_table_script(
'v1', 't1', 'download_cursor', 'call hack_sp_t1(
> ?, ? )' );
>
> Once all the zero values are gone from the hack_t1 table, you can put your
> download_cursor back to the way it should be.
>
> I did warn you it was clumsy, but it should work. Note that I haven't
> checked my code for syntax, but you should get the general idea.
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer Version 8
> Please reply only to the newsgroup
>
> iAnywhere Developer Community : http://www.ianywhere.com/developer
> iAnywhere Documentation :
> http://www.ianywhere.com/developer/product_manuals
> ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
> -> Choose SQL Anywhere Studio
> -> Set "Platform Preview" and "Time Frame" to ALL
>
> "Chris Werner" <cw& #123;please_no_spam}
ATf-s.de> wrote in message
> news:4295b1a5$1@foru
ms-2-dub...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com