Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / May 2008

Tip: Looking for answers? Try searching our database.

Integrity Fails !!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. - 10 May 2008 09:43 GMT
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
Albert D. Kallal - 10 May 2008 20:30 GMT
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

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

Tony Toews [MVP] - 11 May 2008 00:02 GMT
"SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <microbrain@vsnl.com>
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
Signature

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/

aaron.kempf@gmail.com - 15 May 2008 03:05 GMT
I'd consider wrapping _ALL_ of that into a single transaction.

-Aaron

> "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <microbr...@vsnl.com>
> wrote:
[quoted text clipped - 28 lines]
>    Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
>    Tony'sMicrosoft Access Blog -http://msmvps.com/blogs/access/

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.