When I try to update a recordset
rsValidatePassword.updateRecord
I get this error:
Insufficient key column information for updating or refreshing.
The page has a sql statement which checks a username and password from the page before against the db, and brings up all the user's info, and allows changes if necessary.
The sql statement has more than one table in it which I understand is what is causing the problem.
This is because two of the values from the user info table are lookups, so in order not to display to the user unidentifiable numbers, I needed the following sql statement:
rsValidatePassword.setSQLText("SELECT CandidateContactInfo.*, State.StateName, CareerLevel.CareerName " _
& "FROM CandidateContactInfo, State, CareerLevel " _
& "WHERE CandidateContactInfo.State = State.StateID " _
& "AND CandidateContactInfo.CareerLevel = CareerLevel.CareerID " _
& "AND UserName='" & Request.QueryString("txtUserName" & "'OR UserName='" & session("UserName" _
& "' AND Password='" & Request.QueryString("txtPassword" & "'OR Password='" & session("Password" & "'"
What can I do to populate the lookup(listbox) fields with the correct info while still allowing an update? Do I need another recordset?
Thanks in advance for your help!
rsValidatePassword.updateRecord
I get this error:
Insufficient key column information for updating or refreshing.
The page has a sql statement which checks a username and password from the page before against the db, and brings up all the user's info, and allows changes if necessary.
The sql statement has more than one table in it which I understand is what is causing the problem.
This is because two of the values from the user info table are lookups, so in order not to display to the user unidentifiable numbers, I needed the following sql statement:
rsValidatePassword.setSQLText("SELECT CandidateContactInfo.*, State.StateName, CareerLevel.CareerName " _
& "FROM CandidateContactInfo, State, CareerLevel " _
& "WHERE CandidateContactInfo.State = State.StateID " _
& "AND CandidateContactInfo.CareerLevel = CareerLevel.CareerID " _
& "AND UserName='" & Request.QueryString("txtUserName" & "'OR UserName='" & session("UserName" _
& "' AND Password='" & Request.QueryString("txtPassword" & "'OR Password='" & session("Password" & "'"
What can I do to populate the lookup(listbox) fields with the correct info while still allowing an update? Do I need another recordset?
Thanks in advance for your help!