---
title: "gå tillbaka till id"
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/115559-gå-tillbaka-till-id"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "hatti"
published: "2004-11-10T12:49:10.000Z"
updated: "2004-11-10T13:21:41.000Z"
replies: 5
views: 348
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/115559-gå-tillbaka-till-id"
---

# gå tillbaka till id

## #1 — hatti, 2004-11-10T12:49Z

hej kör ett script där jag gör ett match protokoll och tar ena databas id:t och gör om till gameid till nästa databas men nu är det så att när jag gör responce.redirect för att komma tillbaka till matchen får jag inte med mig id:t vad e fel

adressen som skickar
........../Intranet/matchrapport_4_goal.asp?GameID=21
\------------------------------------------------------------------

till scriptet 

```
<!-- #include file="adovbs.inc" -->

<%
ID2 = Request.QueryString("GameId")

Set Connect = Server.CreateObject("ADODB.Connection") 
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("../../../DB/A-Lag.mdb")&";"

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

Addera = "Select * From game_events"
RecSet.Open Addera, Connect, adOpenStatic, adLockOptimistic

	RecSet.AddNew

	RecSet("GameID") = Request.Form("GameID")
	RecSet("GoalPeriod") = Request.Form("GoalPeriod")
	RecSet("GoalMin") = Request.Form("GoalMin")
	RecSet("GoalSec") = Request.Form("GoalSec")
	RecSet("GoalPlayer") = Request.Form("GoalPlayer")
	RecSet("GoalTeam") = Request.Form("GoalTeam")
	RecSet("GoalResultH") = Request.Form("GoalResultH")
	RecSet("GoalResultA") = Request.Form("GoalResultA")
	RecSet("GoalAssPlayer1") = Request.Form("GoalAssPlayer1")
	RecSet("GoalAssPlayer2") = Request.Form("GoalAssPlayer2")
	RecSet("PenPeriod") = Request.Form("PenPeriod")
	RecSet("PenMin") = Request.Form("PenMin")
	RecSet("PenSec") = Request.Form("PenSec")
	RecSet("PenSec") = Request.Form("PenSec")
	RecSet("PenTeam") = Request.Form("PenTeam")
	RecSet("PenLength") = Request.Form("PenLength")
	RecSet("PenReason") = Request.Form("PenReason")

	RecSet.Update
	RecSet.Close

Connect.Close
	Set RecSet = nothing
	Set Connect = nothing

Response.Redirect "../Intranet/matchrapport_3.asp?id=" & ID2

%>
```

 

men sedan kommer jag tillbaka till sidan 

............../Intranet/matchrapport_3.asp?id=

problemet är att id:t inte följer med hittar inte felet

Permalänk: https://www.webforum.nu/p/115559

## #2 — @nders, 2004-11-10T12:51Z

Det lär väl vara denna rad det är fel på:

```
ID2 = Request.QueryString("GameId")
```

Skickar du querystringen GameId till denna sida?

Permalänk: https://www.webforum.nu/p/1481950

## #3 — hatti, 2004-11-10T13:07Z

här är sidan som skickar 

```
<!-- #include file="adovbs.inc" -->
<html>
<head>
<title>Untitled Document</title>
<LINK REL="stylesheet" HREF="../../../formatmall1.css">
</head>

<body>
<%
	   

ID2 = Request.QueryString("GameId")

Set Connect = Server.CreateObject("ADODB.Connection") 
Connect.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("../../../DB/A-Lag.mdb")&";"

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

Addera = "Select * From game_events"
RecSet.Open Addera, Connect, adOpenStatic, adLockOptimistic

%>
<FORM name="form1" action="../scripts/matchrapport_4_goal.asp?id=<%=ID2%>" method="post">
  <table width="429" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><TABLE width="420" align="center" cellPadding=3 cellSpacing=1 bgcolor="#000066">
          <TR bgcolor="#000066">
		  <%
RecSet.Close
Connect.Close
Set RecSet = nothing
Set Connect = nothing
%>
            <TD width="50%" bgcolor="#000066"><B><strong><font color="#FFFFFF"></font></strong></B></TD>
            <TD width="50%"> <div align="right"><font color="#ffffff" size="1" face="Verdana, Arial, Helvetica, sans-serif">Anv:<%=Session("FirstName")%>&nbsp;<%=Session("LastName")%></font></div></TD>
          </TR>
        </TABLE>
        <table width="420" border="0" align="center" cellpadding="3" cellspacing="1">
          <tr>
            <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Registrera 
              m&aring;l, m&aring;lg&ouml;rare och assisterande m&aring;lg&ouml;rare</strong></font></td>
          </tr>
        </table>
        <table width="420" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000066">
          <tr> 
            <td width="48" bgcolor="#000066"> <div align="center"> 
                <p><font color="#FFFFFF"><strong>Period</strong></font></p>
              </div></td>
            <td width="98" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Tid</font></strong></p>
              </div></td>
            <td width="13" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Nr</font></strong></p>
              </div></td>
            <td width="42" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Lag</font></strong></p>
              </div></td>
            <td width="85" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Resultat</font></strong></p>
              </div></td>
            <td width="34" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Pass1</font></strong></p>
              </div></td>
            <td width="34" bgcolor="#000066"> <div align="center"> 
                <p><strong><font color="#FFFFFF">Pass2</font></strong></p>
              </div></td>
          </tr>
        </table>
        <table width="420" border="0" align="center" cellpadding="3" cellspacing="1">
          <tr> 
            <td width="48"><div align="center"> 
                <p> 
                  <select name="GoalPeriod" id="GoalPeriod">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>SD</option>
                  </select>
                  <input name="GameID" type="hidden" value="<%=ID2%>" size="1" maxlength="10">
                </p>
              </div></td>
            <td width="98"><div align="center"> 
                <p> 
                  <input name="GoalMin" type="text" id="GoalMin" size="1" maxlength="2">
                  : 
                  <input name="GoalSec" type="text" id="GoalSec" size="1" maxlength="2">
                </p>
              </div></td>
            <td width="13"><div align="center"> 
                <p> 
                  <input name="GoalPlayer" type="text" id="GoalPlayer" size="1" maxlength="2">
                </p>
              </div></td>
            <td width="42"><div align="center"> 
                <p> 
                  <select name="GoalTeam" id="GoalTeam">
                    <option>A</option>
                    <option>B</option>
                  </select>
                </p>
              </div></td>
            <td width="85"><div align="center"> 
                <p> 
                  <input name="GoalResultH" type="text" id="GoalResultH" size="1" maxlength="2">
                  - 
                  <input name="GoalResultA" type="text" id="GoalSec3" size="1" maxlength="2">
                </p>
              </div></td>
            <td width="34"><div align="center"> 
                <p> 
                  <input name="GoalAssPlayer1" type="text" id="GoalAssPlayer1" size="1" maxlength="2">
                </p>
              </div></td>
            <td width="34"><div align="center"> 
                <p> 
                  <input name="GoalAssPlayer2" type="text" id="GoalAssPlayer2" size="1" maxlength="2">
                </p>
              </div></td>
          </tr>
        </table>
        <table width="420" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">-</font></td>
          </tr>
        </table>
        <table width="420" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><div align="right"> 
                <input name="Submit" type="submit" id="Submit" value="Skicka">
                <input name="Reset" type="reset" id="Reset" value="Rensa">
              </div></td>
          </tr>
        </table>
        
      </td>
    </tr>
  </table>
  </form>
<p>&nbsp;</p>
<p>&nbsp; </p>
</body>
</html>
```

Permalänk: https://www.webforum.nu/p/1481962

## #4 — hatti, 2004-11-10T13:12Z

fungerar nu

Permalänk: https://www.webforum.nu/p/1481964

## #5 — Jesper T, 2004-11-10T13:18Z

Och som alltid skriver man en förklaring till vad som löste problemet för att ev. någon med liknande problem skall bli lite klokare. ;)

Permalänk: https://www.webforum.nu/p/1481967

## #6 — hatti, 2004-11-10T13:21Z

det var gaeid som var fel skulle vara
 ID2 = Request.QueryString("id")

Permalänk: https://www.webforum.nu/p/1481975

---

Tråden på webben: https://www.webforum.nu/amne/asp/115559-gå-tillbaka-till-id
