Problem: I have created three database tables that will not let me edit them.
Here's what I did:
1. In MS Access 2003, I created a database with three tables:
The three tables are related, as shown in the diagram below.
2. Next, I used the "Microsoft SQL Server Migration Assistant for Access" to export the database from MS Access 2003 (on my local computer) to MS SQL Server 2005 (on my database server). That went well.
3. The "Microsoft SQL Server Migration Assistant for Access" application prompted me to "Link" the MS Access tables to the tables in MS SQL Server 2005. This means that when I update the tables in MS Access on my local computer, then the tables in MS SQL Server get updated too -- because the tables displayed in the local MS Access application are, in fact, the actual tables on the MS SQL Server. (This is my understanding, anyway. Correct me if I am mistaken?)
The problem is, I cannot edit any of the three tables in either the local MS Access application, or in the MS SQL Server.
* I cannot add any more records to table "tbl_Biz_Support_Has_Cat" -- in MS Access the AutoNumber is deactivated.
* Or, in MS Access, if I go into tbl_BusinessSupporters and attempt to delete a record, I get this error: "ODBC Call Failed. The DELETE statement conflicted with the Reference Constraint. The conflict occurred in database ascassociation, table dbo.tbl_Biz_Support_Has_Ca
t, column BusinessID. The statement has been terminated. (#3621)"
I would like to be able to edit these database tables in MS Access on my local computer, save the edits, and (since the tables are linked to the MS SQL Server) have the edits appear in the MS SQL Server (hence on the live web site).
What am I doing wrong?
Thank you for any advice!
The SELECT statement that I use in my ColdFusion application:
FROM tbl_BusinessSupporters bs, tbl_BusinessSupportersCategories bsc, tbl_Biz_Support_Has_Cat bshc
WHERE bs.BusinessID = bshc.BusinessID
AND bsc.BusinessCategoryID = bshc.BusinessCategoryID
AND bsc.BusinessCategoryID = 2
ORDER BY BusinessTitle ASC