I'm probably not going about this in the proper way, but it's making me problems:
I have a page that displays all the user's info and also all the job posts he made with their info and an option to change them.
So I opened up a recordset with all the post info where EmployerID = EmployerID. So far, so good. Then, while not eof, I displayed all the info for each post. Also, works great. Then, before the moveNext, I put an update button(onClick = rs.updateRecord), so that each post has its own update button, so each post can be changed on its own(I thought). But, when I click on the button, the page displays only the post which was changed, with all the information from all the other posts stuck into that record, and that's what happens in the database too. All the previous records' values get stuffed into that one's.
I would try to post some code but it's mostly dtc's so I'll just show what's going on. If someone can tell me the right way to do this, I would be so gratefull.
'open employer post recordset
rsEmpPosts.setSQLText("SELECT JobInfo.* " _
& "FROM JobInfo " _
& "WHERE JobInfo.EmployerID =" & employerID)
rsEmpPosts.open
'display each post
do while not rsEmpPosts.EOF
Response.Write "Post Number: " & rsEmpPosts.fields.getValue("ReferenceNum" & "<br>"
'here I have dtc's to display all the info for this post
'here I have an update button
rsEmpPosts.moveNext
loop
I have a page that displays all the user's info and also all the job posts he made with their info and an option to change them.
So I opened up a recordset with all the post info where EmployerID = EmployerID. So far, so good. Then, while not eof, I displayed all the info for each post. Also, works great. Then, before the moveNext, I put an update button(onClick = rs.updateRecord), so that each post has its own update button, so each post can be changed on its own(I thought). But, when I click on the button, the page displays only the post which was changed, with all the information from all the other posts stuck into that record, and that's what happens in the database too. All the previous records' values get stuffed into that one's.
I would try to post some code but it's mostly dtc's so I'll just show what's going on. If someone can tell me the right way to do this, I would be so gratefull.
'open employer post recordset
rsEmpPosts.setSQLText("SELECT JobInfo.* " _
& "FROM JobInfo " _
& "WHERE JobInfo.EmployerID =" & employerID)
rsEmpPosts.open
'display each post
do while not rsEmpPosts.EOF
Response.Write "Post Number: " & rsEmpPosts.fields.getValue("ReferenceNum" & "<br>"
'here I have dtc's to display all the info for this post
'here I have an update button
rsEmpPosts.moveNext
loop