Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Access
3rdpartyusrgrp
access
activexcontrol
adp.sqlserver
commandbarsui
conversion
dataaccess.pages
developers.toolkitode
devtoolkits
externaldata
forms
formscoding
gettingstarted
internet
interopoledde
macros
modulescoding
modulesdaovba
modulesdaovba.ado
multiuser
odbcclientsvr
queries
replication
reports
security
setupconfig
tablesdbdesign
  
 
date: Sat, 10 May 2008 14:13:14 +0530,    group: microsoft.public.access.multiuser        back       


Integrity Fails !!!   
Dear Sir,

In my database I am relating tales & I select enforce referential integrity 
and I select cascade delete related record.

In my application I delete record from parent table so because of cascade 
delete it is deleting from child table. It works fine but I found in some 
case under network it is deleting table from parent but not from child !!!

If I compact database then it breaks relationship of parent & child and then 
it is very difficult to delete record from child.

If I had defined referential integrity & cascade delete then it must delete 
record from child when I compact database.

Please any one tell me why this is happening & what is solution. ?

Thanks,

Sanjay Shah
date: Sat, 10 May 2008 14:13:14 +0530   author:   SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD.

Re: Integrity Fails !!!   
When using a "JET" file share, then any minor disconnecting in your network, 
poor cabling, interference from machinery, or even wireless networks are all 
sources that
can easily damaged a jet based file system.

You have to have a very solid high quality network to use a jet file share 
system. Anything else but a high quality functioning network is going to be 
subject to frequent damage to your database file.

Some sources and ways to avoid corruption is mentioned here:
http://www.granite.ab.ca/access/corruptmdbs.htm

I also explain using pictures and diagrams as to why corruption occurs. If 
you are a visual type thinking person, then read the following article as it 
explains why corruption occurs when you have a minor glitch or disconnect in 
your network:

http://www.members.shaw.ca/AlbertKallal//Wan/Wans.html


-- 
Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com
date: Sat, 10 May 2008 13:30:34 -0600   author:   Albert D. Kallal

Re: Integrity Fails !!!   
"SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." 
wrote:

>In my database I am relating tales & I select enforce referential integrity 
>and I select cascade delete related record.
>
>In my application I delete record from parent table so because of cascade 
>delete it is deleting from child table. It works fine but I found in some 
>case under network it is deleting table from parent but not from child !!!

I never use cascade deletes as I prefer to handle this myself in the
few situations where this happens.

I would delete the child records and then the parent records in code.

Code something like

dim strsql as string

strsql = "Delete * from ChildTable where ParentForeignKeyID=" & _
	me.parentid.
currentdb.execute strsql, dbfailonerror

strsql = "Delete * from ParentTable where ID=" & me.parentid.
currentdb.execute strsql, dbfailonerror

Tony
-- 
Tony Toews, Microsoft Access MVP
   Please respond only in the newsgroups so that others can 
read the entire thread of messages.
   Microsoft Access Links, Hints, Tips & Accounting Systems at 
http://www.granite.ab.ca/accsmstr.htm
   Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
date: Sat, 10 May 2008 17:02:39 -0600   author:   Tony Toews [MVP]

Re: Integrity Fails !!!   
I'd consider wrapping _ALL_ of that into a single transaction.

-Aaron




On May 10, 4:02 pm, "Tony Toews [MVP]"  wrote:
> "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." 
> wrote:
>
> >In my database I am relating tales & I select enforce referential integrity
> >and I select cascade delete related record.
>
> >In my application I delete record from parent table so because of cascade> >delete it is deleting from child table. It works fine but I found in some> >case under network it is deleting table from parent but not from child !!> I never use cascade deletes as I prefer to handle this myself in the
> few situations where this happens.
>
> I would delete the child records and then the parent records in code.
>
> Code something like
>
> dim strsql as string
>
> strsql = "Delete * from ChildTable where ParentForeignKeyID=" & _
>         me.parentid.
> currentdb.execute strsql, dbfailonerror
>
> strsql = "Delete * from ParentTable where ID=" & me.parentid.
> currentdb.execute strsql, dbfailonerror
>
> Tony
> --TonyToews, Microsoft Access MVP
>    Please respond only in the newsgroups so that others can
> read the entire thread of messages.
>    Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
>    Tony'sMicrosoft Access Blog -http://msmvps.com/blogs/access/
date: Wed, 14 May 2008 19:05:25 -0700 (PDT)   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us