joe_pool_is Posted January 22, 2008 Posted January 22, 2008 I have 2 tables: EmployeeInfo and MGRSPV (Manager/Supervisor). On the DataGridView, we modified the EmployeeInfo Table's Fill/GetData to replace the EmployeeInfo.MGR value with the Manager/Supervisor's name from MGRSPV.[MGR/SPVSR] as follows: SELECT EmployeeInfo.FIRSTNAME, EmployeeInfo.LASTNAME, MGRSPV.[MGR/SPVSR] FROM EmployeeInfo INNER JOIN MGRSPV ON EmployeeInfo.MGR = MGRSPV.ID It was working great, but crashed with an unhandled exception whenever I tried to Save data on the 'AutoGenerated' line below. Now, VS refuses to compile:this.employeeInfoTableAdapter.Update(this.SqlSrvrDataSet.EmployeeInfo); 'EmployeeInfoTableAdapter' does not contain a definition for 'Update' I guess this means I need to write a custom Update query for the EmployeeInfo Table. Right? How would I write the statement? How would I later use the statement in my code? Do I need to manually read in and supply parameters from my form? How would they be inserted? Using SqlParameter with ParameterName/Value pairs seems like it would work, but then I'd need an SqlCommand and have to find a way to update the TableAdapter. The Wizard created everything on this except for the custom Fill/GetData SQL piece, so I am left out in the cold! Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.