Home > Archive > SQL Anywhere Mobile > April 2005 > Resolving referential integrity violations









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 Resolving referential integrity violations
chandhu

2005-04-09, 8:26 pm

Hi,

We are using Sybase ASA 8.0.2.4308. Using Mobilink Synchrnozation we are
uploading/downloading data.
I have two tables lets suppose table1, table2.
In table1 I have a column "id" which is PrimaryId.
Table2 is Foreignkey to Table1 Null can be allowed for this column.
There is some chances that Table1 doesn't contain any data but in Table2
there are some rows which are null for that column.
So my problem is I want to download Table2 data which is having null values
for that column. Is it possible?

When I open the log file...
I. 04/08 18:33:58. # rows deleted in table Table1: 0
I. 04/08 18:33:58. # rows deleted in table Table2: 0
I. 04/08 18:35:33. Resolving referential integrity violations on table
Table2, role Role1
I. 04/08 18:35:33. delete from "DBA"."Table2" from "DBA"."Table2" ft where
not exists ( select * from "DBA"."Table1" pt where ( ft."ID" = pt."Id" or
ft."ID" is NULL ) )
I. 04/08 18:35:34. 56 rows deleted.

What should I do to download table2 data.

Table2. Download_cursor is

select a,b,c from table2
left outer join table2.id = table1.id.

Waiting for reply,
Thanks.
Chandhu.




Reg Domaratzki \(iAnywhere Solutions\)

2005-04-09, 8:26 pm

Take an EBF and call me in the morning. :)

ML Bug Fix (QTS 350374) - DBMLSync Silent RI Resolution could delete extra
rows
Versions affected: all
Versions fixed: 802.4398, 803.5002, 900.1292, 901.1841, 902.2259
Customer Description:
If DBMLSync was forced to do RI resolution after applying the download
stream, if the parent table had been empty, then every row in the child
table
would be erased, even those where there were NULL values in the referencing
column(s) in the child table. These rows are no longer erased during RI
resolution.

--
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

"chandhu" <chandrasekhars@i-vantage.com> wrote in message
news:42569511$1@foru
ms-1-dub...
> Hi,
>
> We are using Sybase ASA 8.0.2.4308. Using Mobilink Synchrnozation we are
> uploading/downloading data.
> I have two tables lets suppose table1, table2.
> In table1 I have a column "id" which is PrimaryId.
> Table2 is Foreignkey to Table1 Null can be allowed for this column.
> There is some chances that Table1 doesn't contain any data but in Table2
> there are some rows which are null for that column.
> So my problem is I want to download Table2 data which is having null

values
> for that column. Is it possible?
>
> When I open the log file...
> I. 04/08 18:33:58. # rows deleted in table Table1: 0
> I. 04/08 18:33:58. # rows deleted in table Table2: 0
> I. 04/08 18:35:33. Resolving referential integrity violations on table
> Table2, role Role1
> I. 04/08 18:35:33. delete from "DBA"."Table2" from "DBA"."Table2" ft where
> not exists ( select * from "DBA"."Table1" pt where ( ft."ID" = pt."Id" or
> ft."ID" is NULL ) )
> I. 04/08 18:35:34. 56 rows deleted.
>
> What should I do to download table2 data.
>
> Table2. Download_cursor is
>
> select a,b,c from table2
> left outer join table2.id = table1.id.
>
> Waiting for reply,
> Thanks.
> Chandhu.
>
>
>
>



chandhu

2005-04-11, 7:25 am

Hi,
Thanks for the reply.
I have downloaded

for Server: asa_802_win32_ebf_45
11.zip
for PDA : asa_802_ce_ebf_4505.zip
I have successfully updated to the patch 4511 on server but when I am trying
to update for CE devices I am getting error "Could not connect to mobile
device".
We are using Active sync 3.8.0.
So what will be the problem?

Thanks.

Chandhu.


"Reg Domaratzki (iAnywhere Solutions)" < Spam_bad_rdomarat@ia
nywhere.com>
wrote in message news:42569c32$1@foru
ms-1-dub...
> Take an EBF and call me in the morning. :)
>
> ML Bug Fix (QTS 350374) - DBMLSync Silent RI Resolution could delete extra
> rows
> Versions affected: all
> Versions fixed: 802.4398, 803.5002, 900.1292, 901.1841, 902.2259
> Customer Description:
> If DBMLSync was forced to do RI resolution after applying the download
> stream, if the parent table had been empty, then every row in the child
> table
> would be erased, even those where there were NULL values in the

referencing
> column(s) in the child table. These rows are no longer erased during RI
> resolution.
>
> --
> 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
>
> "chandhu" <chandrasekhars@i-vantage.com> wrote in message
> news:42569511$1@foru
ms-1-dub...
> values
where[color=darkred]

or[color=darkred]
>
>



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