0

데이터를 수집하는 양식 페이지가 있습니다. 사용자가 클릭은 "포스트 페이지로 이동하는 제출.이 페이지의 끝에서 내가 리디렉션 코드를 사용하고있다. response.redirect("test.asp?ChecklistID=" + ChecklistID) 어떤 이유로, 그 결과이.Response.Redirect error

/test.asp입니까? ChecklistID = 4784 % 왜이 두 ID의에 반환 204,784

? 난 단지 '결과'테이블에서 하나 개의 레코드가 있습니다. 그리고는 '4784'입니다.

을 코드

<% 
'Option Explicit 
Dim SQLStmt, sql, RS, ChecklistID, Location, ChecklistDate, Driveup, 
ConnectString, conn, objconn 
Dim weeds, parking_lot, sidewalk, windows, exterior_trash, door_clean 
Dim mats_clean, Notes_page1 

Location = Request("Location") 
ChecklistDate = Request("ChecklistDate") 
Driveup = Request("Driveup") 
ChecklistID = Request("ChecklistID") 
weeds = Request("weeds") 
parking_lot = Request("parking_lot") 
sidewalk = Request("sidewalk") 
windows = Request("windows") 
exterior_trash = Request("exterior_trash") 
door_clean = Request("door_clean") 
mats_clean = Request("mats_clean") 
Notes_page1 = Request("Notes_page1") 

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & 
Server.MapPath("../xyz/mydatabase.mdb") 
Set conn = Server.CreateObject("ADODB.Connection") 
conn.open ConnectString 

SQLStmt = "SELECT * FROM Results WHERE ChecklistID =" & ChecklistID & " ; " 

Set RS = Server.CreateObject("ADODB.Recordset") 

RS.open "Results", conn, 3, 3 
RS.Update 
RS("ChecklistDate") = ChecklistDate 
RS("Driveup") = Driveup 
RS("weeds") = weeds 
RS("parking_lot") = parking_lot 
RS("sidewalk") = sidewalk 
RS("windows") = windows 
RS("exterior_trash") = exterior_trash 
RS("door_clean") = door_clean 
RS("mats_clean") = mats_clean 
RS("Notes_page1") = Notes_page1 
RS.Update 

RS.close 
set RS = nothing 
conn.close 
set conn = nothing 

response.redirect("test.asp?ChecklistID=" + ChecklistID) 

%> 
추가
+0

관련 코드를 표시 하시겠습니까? – IrishChieftain

+0

결과는 실제로 하나의 id 2 번입니다 - 이스케이프 된 ChecklistID = 4784, 4784' (쉼표 뒤에 공백이 있음 - 이스케이프 후 % 20입니다). 변수 ChecklistID를 검사 했습니까? 그것은 문자열인가? 어쩌면 코드에서 다른 것을 두 번 추가하는 somwhere가 있을까요? – smartobelix

+0

코드 추가 – Jim

답변

0

브라우저가 response.redirect를 사용하여 일부 기록을 보유하고있을 수 있습니다. Server.Transfer를 사용해보십시오. 또는 동일한 페이지 인 경우 쿼리 문자열을 다시 추가하지 않아도됩니다.

+0

이 response.redirect 코드를 사용하여 기록을 보유하고있는 브라우저에 문제가 발생한 적이 한번도 없습니다. 나는 실종됐다. – Jim

+0

Fwiw : https://msdn.microsoft.com/en-us/library/540y83hx.aspx?f=255&MSPPError=-2147217396 – wazz

0

해결 동일한 숨겨진 필드가 두 번 문제를 일으켰습니다.