D
D-Someone
Our MS Access app has a SQL Server 2000 backend. We have a form viewed in
datasheet mode with a child datasheet. Whenever an item is attempted to be
deleted from the paraent datasheet MS Access pops up with an ODBC error if
there is a referential integrity problem. It will then CRASH everytime
causing the user to CTRL-ALT-DEL and restart the app.
I would like to put in a work around in the code so that in the delete
method or before delete confirm method I can cancel the delete and do it
manually by calling an SQL Server stored procedure using ADO (instead of
letting the MS Access form do it...and crash). Or I could put a msgbox in
the BeforeDelConfirm event to tell the user they cannot delete this record
until the child records are deleted first.
I can't even do this workaround because it seems BeforeDelConfirm wont even
be called until after MS Access pops up with an ODBC error and crashes....
FYI, The referential integrity problem is related to records being deleted
that exist in another table (not the sub datasheet)
Is there anything I can do?
<rant>I find MS Access is very buggy when dealing with an SQL Server backend
and these workarounds are buggy and annoying to have to deal with...
</rant>
datasheet mode with a child datasheet. Whenever an item is attempted to be
deleted from the paraent datasheet MS Access pops up with an ODBC error if
there is a referential integrity problem. It will then CRASH everytime
causing the user to CTRL-ALT-DEL and restart the app.
I would like to put in a work around in the code so that in the delete
method or before delete confirm method I can cancel the delete and do it
manually by calling an SQL Server stored procedure using ADO (instead of
letting the MS Access form do it...and crash). Or I could put a msgbox in
the BeforeDelConfirm event to tell the user they cannot delete this record
until the child records are deleted first.
I can't even do this workaround because it seems BeforeDelConfirm wont even
be called until after MS Access pops up with an ODBC error and crashes....
FYI, The referential integrity problem is related to records being deleted
that exist in another table (not the sub datasheet)
Is there anything I can do?
<rant>I find MS Access is very buggy when dealing with an SQL Server backend
and these workarounds are buggy and annoying to have to deal with...
</rant>