hej ng jeg er i gang med at lave en database, men hver gang man
opdatere den melder den fejlen.
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/karakterbogen/site/karakter/opdater.asp, line 60
strSQL = strSQL & " Where Id = " & Request.Form("t0")"
------------------------------------------------------^
mit opdaterings felt ser sådan haer ud
<%
' Databaseforbindelse
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath ("../../db/karakter.mdb")
Conn.Open DSN
' SQL sætning opbygges
strSQL = "Update personer set "
strSQL = strSQL & "Bruger= '" & Request.Form("t1") & "', "
strSQL = strSQL & "Rollenavn= '" & Request.Form("t2") & "', "
strSQL = strSQL & "Race= '" & Request.Form("t3") & "', "
strSQL = strSQL & "Xp= '" & Request.Form("x1") & "', "
strSQL = strSQL & "Xp1= '" & Request.Form("x2") & "', "
strSQL = strSQL & "Egenskab1= '" & Request.Form("e1") & "', "
strSQL = strSQL & "Egenskab2= '" & Request.Form("e2") & "', "
strSQL = strSQL & "Egenskab3= '" & Request.Form("e3") & "', "
strSQL = strSQL & "Egenskab4= '" & Request.Form("e4") & "', "
strSQL = strSQL & "Egenskab5= '" & Request.Form("e5") & "', "
strSQL = strSQL & "Egenskab6= '" & Request.Form("e6") & "', "
strSQL = strSQL & "Egenskab7= '" & Request.Form("e7") & "', "
strSQL = strSQL & "Egenskab8= '" & Request.Form("e8") & "', "
strSQL = strSQL & "Egenskab9= '" & Request.Form("e9") & "', "
strSQL = strSQL & "Egenskab0= '" & Request.Form("e0") & "', "
strSQL = strSQL & "Hp= '" & Request.Form("t4") & "', "
strSQL = strSQL & "Np= '" & Request.Form("t5") & "', "
strSQL = strSQL & "Mp= '" & Request.Form("t6") & "', "
strSQL = strSQL & "LA1= '" & Request.Form("l1") & "', "
strSQL = strSQL & "LA2= '" & Request.Form("l2") & "', "
strSQL = strSQL & "LA3= '" & Request.Form("l3") & "', "
strSQL = strSQL & "LA4= '" & Request.Form("l4") & "', "
strSQL = strSQL & "LA5= '" & Request.Form("l5") & "', "
strSQL = strSQL & "LA6= '" & Request.Form("l6") & "', "
strSQL = strSQL & "LA7= '" & Request.Form("l7") & "', "
strSQL = strSQL & "LA8= '" & Request.Form("l8") & "', "
strSQL = strSQL & "LA9= '" & Request.Form("l9") & "', "
strSQL = strSQL & "LA0= '" & Request.Form("l0") & "', "
strSQL = strSQL & "GM1= '" & Request.Form("g1") & "', "
strSQL = strSQL & "GM2= '" & Request.Form("g2") & "', "
strSQL = strSQL & "GM3= '" & Request.Form("g3") & "', "
strSQL = strSQL & "GM4= '" & Request.Form("g4") & "', "
strSQL = strSQL & "GM5= '" & Request.Form("g5") & "', "
strSQL = strSQL & "GM6= '" & Request.Form("g6") & "', "
strSQL = strSQL & "GM7= '" & Request.Form("g7") & "', "
strSQL = strSQL & "GM8= '" & Request.Form("g8") & "', "
strSQL = strSQL & "GM9= '" & Request.Form("g9") & "', "
strSQL = strSQL & "GM0= '" & Request.Form("g0") & "' "
strSQL = strSQL & " Where Id = " & Request.Form("t0")"
' SQL sætning eksekveres
Conn.Execute(strSQL)
' Luk databaseforbindelse
Conn.Close
Set Conn = Nothing
%>
hvad er det der går galt?
her er siden den skal hente data fra
<div align="center">
<form action="opdater.asp" method="post" name="frmOne">
<fieldset>
<legend>Karakterark info</legend>
<div align="left">
<input type="hidden" name="t0"
value='<%=request.querystring("Id")%>'>
<input type="hidden" name="t1"
value='<%=request.querystring("name")%>'>
<input type="hidden" name="t2" value='<%=rs("Rollenavn")%>'>
<input type="hidden" name="t3" value='<%=rs("Race")%>'>
<input type="hidden" name="x2" value='<%=rs("Xp1")%>'>
<label>XP Tilbage:</label> <input type="text" readonly="readonly"
name="x1" id="XP" value='<%=rs("Xp")%>'><br/><br/>
<label>Egenskaber:</label>
<label></label> &n
bsp; <label>Lært af:</label> <br/>
<input type="text" readonly="readonly" name="e1"
value='<%=rs("Egenskab1")%>'>
<select id="ANumber" onChange="showtext1(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l1" value='<%=rs("LA1")%>'><br/>
<input type="text" readonly="readonly" name="e2"
value='<%=rs("Egenskab2")%>'>
<select id="BNumber" onChange="showtext2(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l2" value='<%=rs("LA2")%>'><br/>
<input type="text" readonly="readonly" name="e3"
value='<%=rs("Egenskab3")%>'>
<select id="CNumber" onChange="showtext3(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l3" value='<%=rs("LA3")%>'><br/>
<input type="text" readonly="readonly" name="e4"
value='<%=rs("Egenskab4")%>'>
<select id="DNumber" onChange="showtext4(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l4" value='<%=rs("LA4")%>'><br/>
<input type="text" readonly="readonly" name="e5"
value='<%=rs("Egenskab5")%>'>
<select id="ENumber" onChange="showtext5(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l5" value='<%=rs("LA5")%>'><br/>
<input type="text" readonly="readonly" name="e6"
value='<%=rs("Egenskab6")%>'>
<select id="FNumber" onChange="showtext6(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l6" value='<%=rs("LA6")%>'><br/>
<input type="text" readonly="readonly" name="e7"
value='<%=rs("Egenskab7")%>'>
<select id="GNumber" onChange="showtext7(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l7" value='<%=rs("LA7")%>'><br/>
<input type="text" readonly="readonly" name="e8"
value='<%=rs("Egenskab8")%>'>
<select id="HNumber" onChange="showtext8(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l8" value='<%=rs("LA8")%>'><br/>
<input type="text" readonly="readonly" name="e9"
value='<%=rs("Egenskab9")%>'>
<select id="INumber" onChange="showtext9(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l9" value='<%=rs("LA9")%>'><br/>
<input type="text" readonly="readonly" name="e0"
value='<%=rs("Egenskab0")%>'>
<select id="JNumber" onChange="showtext10(this);"><!--#include
file="../../db/option.inc"--></select>
<input type="text" name="l0"
value='<%=rs("LA0")%>'><br/><br/>
<label>Hp:</label> <input type="text" readonly="readonly"
name="t4" value='<%=rs("Hp")%>'><br/>
<label>Np:</label> <input type="text" readonly="readonly"
name="t5" value='<%=rs("Np")%>'><br/>
<label>Mp:</label> <input type="text" readonly="readonly"
name="t6" value='<%=rs("Mp")%>'><br/>
<br /><p align="center">Egenskabs Beskrivelse</p>
<div align="center">
<textarea name="info" cols="60" rows="5" readonly="readonly"
id="info"></textarea>
</div>
<br/><br/>
<div align="center">
<input type="reset" class="button" value="Slet ændringer">
<input type="button" class="button" value="udregn xp" onClick =
calculate()>
<input type="submit" class="button" value="Gem">
</div></div>
</fieldset>
</form>
</div>
håber i kan hjælpe.
--
Vil du lære at kode HTML, XHTML, CSS, SSI, ASP eller ASP.NET?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials