I am trying to split some data from the Employee table for future expansion and security.
Current table
tblEmployee
EmployeePK,
EmployeeID, ' this is the users Network Logon ID.
EmployeeFN,
EmployeeMI,
EmployeeLN,
EmployeeDept
New Tables
tblEmployees
EmployeeID_PK
EmployeeFN
EmployeeMI
EmployeeLN
EmployeeDept
tblEmployeeNetAccts
EmployeeID_PK
EmployeeDomainID
EmployeeFIPSID
tblEmployees.EmployeeID_PK --> One-to-One --> tblEmployeeNetAccts.EmployeeID_PK
Cascade Inserts and Deletes
Created a view as
But when trying to add a row. I get the following error.
No row updated
The data in row 62 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Message: View or function 'View_Employees' is not updatable because the modification afffects multiple base tables.
Correct the errors and retry or rpess ESC to cancel the change(s).
Could someone please give some insight on how this all works and where I should be looking to accomplish what i would like to do.
Thanks!!
Thanks
John Fuhrman
Current table
tblEmployee
EmployeePK,
EmployeeID, ' this is the users Network Logon ID.
EmployeeFN,
EmployeeMI,
EmployeeLN,
EmployeeDept
New Tables
tblEmployees
EmployeeID_PK
EmployeeFN
EmployeeMI
EmployeeLN
EmployeeDept
tblEmployeeNetAccts
EmployeeID_PK
EmployeeDomainID
EmployeeFIPSID
tblEmployees.EmployeeID_PK --> One-to-One --> tblEmployeeNetAccts.EmployeeID_PK
Cascade Inserts and Deletes
Created a view as
Code:
SELECT dbo.tblEmployee.EmployeeFN, dbo.tblEmployee.EmployeeMI, dbo.tblEmployee.EmployeeLN, dbo.tblEmployee.EmployeeDept,
dbo.tblEmployeeNetAccts.EmployeeDomainID, dbo.tblEmployeeNetAccts.EmployeeFIPSID
FROM dbo.tblEmployee INNER JOIN
dbo.tblEmployeeNetAccts ON dbo.tblEmployee.EmployeeID_PK = dbo.tblEmployeeNetAccts.EmployeeID_PK
But when trying to add a row. I get the following error.
No row updated
The data in row 62 was not committed.
Error Source: .Net SqlClient Data Provider.
Error Message: View or function 'View_Employees' is not updatable because the modification afffects multiple base tables.
Correct the errors and retry or rpess ESC to cancel the change(s).
Could someone please give some insight on how this all works and where I should be looking to accomplish what i would like to do.
Thanks!!
Thanks
John Fuhrman