![]() |
| ||
| Save Record - keeps updating with 1st records data Hey guys! I figured it might be easier to have my various questions in separate posts, to avoid confusion. My next problem is that with two of my tables (Hours Worked and Occupations) when i want to save the records, it places the correct values (taken from text boxes on the form) and sets the recordset to those values, but then for some strange reason, it uses the data from the first record in the table to update the record. i.e. Record 1 = employee id: 001 name: "Donald" Record 2 = employee id: 002 name: "Sammy" new name for record 2 = "Sam" thus Record 2 should = employee id: 002 name: Sam but something in my code causes it to become employee id:002 name: Donald here is the code for the hours worked save button Private Sub CmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSave.Click The query that updates the hours worked is as follows: UPDATE Employee_Hours_Worked_Table And then i'm also getting an error: Column 'Employee_ID' is constrained to be unique. Value '12' is already present, but i'm not (or at least i'm not intending to change the employee_id. i just want to change the number of hours worked where the employee_id is the same as the employee_id in my current row) These errors have stumped me. Maybe its the lack of sleep or possibly my lack of knowledge, but i'd really, really appreciate some help since i have to get this program finished by next week Thanks for taking the time to read my post Laura |
| ||
| OMG did you ever get this resolved. I am experiencing the same problem w/ vb6 sql server 2005 as data engine Help PLEASE Quote:
|
| All times are GMT -4. The time now is 5:39 pm. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC