Hello. Following the SQL Server seminar... I published my customer table to the SQL server DB using the ODBC file connection. Next step was to delete the customer table in Access and then link to the one published to the SQL server. However, Access won't allow me to delete the table due to all of the relationships. What now?
Scott Axton
@Reply 4 years ago
This is one of the reasons that Richard doesn't go into great lengths of using the Relationships tool.
( Database Tools -> Relationships on the menu ribbon)
You will need to go to that window and click on each of the link lines then press delete to get rid of the Relationship in Access. Once you do that, "un-linking" the tables, you will be able to remove them.
If you set up your database properly, following along with Richards teaching, you handle the relationships programmatically not through the database.
Teeka LeoneOP
@Reply 4 years ago
Thanks Scott, I am familiar with where and how to delete relationships. Just not how to put them back using the method you describe. Do you know what classes the handling of relationships programmatically is in? I haven't see that in any classes I've taken so far. Thanks in advance!
Scott Axton
@Reply 4 years ago
That is what the ID in every table is for. The relationship window is just used as a graphical representation.
As you have discovered SQL Server not only doesn't use it but doesn't support it. There isn't a substitution that I know of.
You need to delete the GLOBAL relationships in your database, however this shouldn't break your queries that use AD-HOC relationships unless you've set up referential integrity with cascade updates and deletes. If you don't know what that means, then don't worry about it, but I covered this stuff in a class you already have: Access Expert 2, lesson 2.
There's a reason why I don't generally use global relationships in my databases. They're a pain in the behind. I think I talk about that in the lesson too. The ONLY two reasons you'd really need them are for preventing orphans (order details without a parent order) and for cascade deletes (deleting all the details when you delete an order). BOTH can be done with VBA programmatically, which is what I prefer.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access SQL Server Lessons.