|
Home > Archive > SQL Anywhere database > October 2005 > Problem with event Upload_update
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 |
Problem with event Upload_update
|
|
| Rodrigo Defavari 2005-10-27, 7:40 am |
| Hello,
I need help. I using ASA9 (in a Palm Aplication) syncronizing with
Oracle, and I have this problem:
I have one script in the event upload_insert and another one in the event
upload_update, When I insert a new row in my application in the Palm the
event upload_insert functions normally on syncronization. After I make one
update in this row and make the syncronization again, But the event
upload_update does not execute.
I am ordering below the SQL of my update:
(UPDATE wf_pre_pedido SET
LIBERADO_REPRESENTAN
TE = TO_NUMBER(1) ,
DATA_LIBERACAO = sysdate
where
(id_pedido_pda = TO_NUMBER(?)
AND PEDIDO = TO_NUMBER(?)
AND DATA = TO_DATE(?)
AND USUARIO = ?
AND TP_PRODUTO = TO_NUMBER(?)
AND DT_PEDIDO = TO_DATE(?)
AND COD_CLIENTE = TO_NUMBER(?)
AND COD_REPRES = TO_NUMBER(?)
AND NUM_PED_EMPRESA = TO_NUMBER(?)
AND NUM_PED_CLIENTE = ?
AND PRAZO_ENTR_CLIENTE = TO_DATE(?)
AND ENTREGA_PARCIAL = TO_NUMBER(?)
AND CUSTO_FINANC_NO_FAT = TO_NUMBER(?)
AND PORC_CUSTO_FINANC = TO_NUMBER(?)
AND COD_REDESPACHO = TO_NUMBER(?)
AND COD_FRETE_REDESP = TO_NUMBER(?)
AND COD_TRANSP = TO_NUMBER(?)
AND COD_FRETE = TO_NUMBER(?)
AND COD_PAGTO = TO_NUMBER(?)
AND TABELA_PRECO_VENDA = TO_NUMBER(?)
AND PORC_CUSTO_FINANC_IN
CLUSO = TO_NUMBER(?)
AND COD_CLIENTE2 = TO_NUMBER(?)
AND COD_PESSOA_ESTAB_JUR
IDICO = TO_NUMBER(?)
AND GENERO = TO_NUMBER(?)
AND APLICACAO = TO_NUMBER(?)
AND COD_CLIENTE3 = TO_NUMBER(?)
AND PORC_DESCONTO = TO_NUMBER(?)
AND COMISSAO = TO_NUMBER(?)
AND DEPARTAMENTO = ?
AND LIBERADO_REPRESENTAN
TE = TO_NUMBER(?)
AND DATA_LIBERACAO = TO_DATE(?)
AND ENVIADO = TO_NUMBER(?)
/*AND LIBERADO_REPRESENTAN
TE = 1*/
OR 1=1 )
)
in my application in palm, the field that I make update is
liberado_representan
te.
I would like to anybody discoverer what's happening.
Thanks
--
Rodrigo Defavari
Developer
AKB IT Solutions Ltda. - Tel: 19 3466-9672
rodrigo.defavari@akbit.com
Evite imprimir ! Pense em sua responsabilidade e compromisso com o MEIO
AMBIENTE.
--
Rodrigo Defavari
Desenvolvedor
AKB IT Solutions Ltda. - Tel: 19 3466-9672
rodrigo.defavari@akbit.com
Evite imprimir ! Pense em sua responsabilidade e compromisso com o MEIO
AMBIENTE.
| |
| Breck Carter [TeamSybase] 2005-10-27, 7:40 am |
| The entire row is uploaded, with the non-primary-key column values
first, followed by the primary-key columns. The upload_update script
usually looks something like this:
CALL ml_add_table_script ( '1', 't1', 'upload_update', '
UPDATE t1
SET non_key_1 = ?,
non_key_2 = ?
WHERE key_1 = ?
AND key_2 = ?' );
On 24 Oct 2005 06:56:50 -0700, "Rodrigo Defavari"
<rodrigo.defavari@akbit.com> wrote:
>Hello,
>
>I need help. I using ASA9 (in a Palm Aplication) syncronizing with
>Oracle, and I have this problem:
>
>I have one script in the event upload_insert and another one in the event
>upload_update, When I insert a new row in my application in the Palm the
>event upload_insert functions normally on syncronization. After I make one
>update in this row and make the syncronization again, But the event
>upload_update does not execute.
>
>I am ordering below the SQL of my update:
>
>(UPDATE wf_pre_pedido SET
>
> LIBERADO_REPRESENTAN
TE = TO_NUMBER(1) ,
>DATA_LIBERACAO = sysdate
>
>where
> (id_pedido_pda = TO_NUMBER(?)
>AND PEDIDO = TO_NUMBER(?)
>AND DATA = TO_DATE(?)
>AND USUARIO = ?
>AND TP_PRODUTO = TO_NUMBER(?)
>AND DT_PEDIDO = TO_DATE(?)
>AND COD_CLIENTE = TO_NUMBER(?)
>AND COD_REPRES = TO_NUMBER(?)
>AND NUM_PED_EMPRESA = TO_NUMBER(?)
>AND NUM_PED_CLIENTE = ?
>AND PRAZO_ENTR_CLIENTE = TO_DATE(?)
>AND ENTREGA_PARCIAL = TO_NUMBER(?)
>AND CUSTO_FINANC_NO_FAT = TO_NUMBER(?)
>AND PORC_CUSTO_FINANC = TO_NUMBER(?)
>AND COD_REDESPACHO = TO_NUMBER(?)
>AND COD_FRETE_REDESP = TO_NUMBER(?)
>AND COD_TRANSP = TO_NUMBER(?)
>AND COD_FRETE = TO_NUMBER(?)
>AND COD_PAGTO = TO_NUMBER(?)
>AND TABELA_PRECO_VENDA = TO_NUMBER(?)
>AND PORC_CUSTO_FINANC_IN
CLUSO = TO_NUMBER(?)
>AND COD_CLIENTE2 = TO_NUMBER(?)
>AND COD_PESSOA_ESTAB_JUR
IDICO = TO_NUMBER(?)
>AND GENERO = TO_NUMBER(?)
>AND APLICACAO = TO_NUMBER(?)
>AND COD_CLIENTE3 = TO_NUMBER(?)
>AND PORC_DESCONTO = TO_NUMBER(?)
>AND COMISSAO = TO_NUMBER(?)
>AND DEPARTAMENTO = ?
>AND LIBERADO_REPRESENTAN
TE = TO_NUMBER(?)
>AND DATA_LIBERACAO = TO_DATE(?)
>AND ENVIADO = TO_NUMBER(?)
>/*AND LIBERADO_REPRESENTAN
TE = 1*/
>OR 1=1 )
> )
>
>
>in my application in palm, the field that I make update is
> liberado_representan
te.
>I would like to anybody discoverer what's happening.
>
>Thanks
>
>--
>
>
>Rodrigo Defavari
>Developer
>AKB IT Solutions Ltda. - Tel: 19 3466-9672
>rodrigo.defavari@akbit.com
>
>Evite imprimir ! Pense em sua responsabilidade e compromisso com o MEIO
>AMBIENTE.
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Greg Fenton 2005-10-27, 7:40 am |
| Rodrigo Defavari wrote:
> I have one script in the event upload_insert and another one in the event
> upload_update, When I insert a new row in my application in the Palm the
BTW: this is a question about synchronization, so you'd be better off
asking in the MobiLink newsgroup:
sybase.public.sqlanywhere.mobilink
For questions about your Palm application, which is likely using
UltraLite, post to:
sybase.public.sqlanywhere.ultralite
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|
|