Avatar billede langfinger Nybegynder
07. juni 2003 - 15:32 Der er 1 kommentar og
1 løsning

Endnu en SQL fejl

Hej

Jeg har dette script:

<!--#include file="top.asp"-->
                    <font size="2">
<%
strSQL = "Update clan set "
strSQL = strSQL & "navn= '" & Request.Form("rnavn") & "', "
strSQL = strSQL & "tag= '" & Request.Form("tag") & "', "
strSQL = strSQL & "hp= '" & Request.Form("hp") & "', "
strSQL = strSQL & "chan= '" & Request.Form("chan") & "', "
strSQL = strSQL & "pulje= '" & Request.Form("pulje") & "', "
strSQL = strSQL & "v= '" & Request.Form("v") & "', "
strSQL = strSQL & "u= '" & Request.Form("u") & "', "
strSQL = strSQL & "t= '" & Request.Form("t") & "', "
strSQL = strSQL & "s= '" & Request.Form("s") & "', "
strSQL = strSQL & "p= '" & Request.Form("p") & "' "
strSQL = strSQL & " Where id = '" & Request.Querystring("id") & "'"
Conn.Execute(strSQL)

response.write "Tillykke!<br><br>Den valgte clan er blevet redigeret!"

Conn.Close
Set Conn = Nothing
%>
<!--#include file="bund.asp"-->

Fejlen er:

Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/cup/retnews-t.asp, line 16


Hjælp mig :)

Lange
Avatar billede ellebaek Nybegynder
07. juni 2003 - 15:35 #1
strSQL = "Update clan set "
strSQL = strSQL & "navn= '" & Request.Form("rnavn") & "', "
strSQL = strSQL & "tag= '" & Request.Form("tag") & "', "
strSQL = strSQL & "hp= '" & Request.Form("hp") & "', "
strSQL = strSQL & "chan= '" & Request.Form("chan") & "', "
strSQL = strSQL & "pulje= '" & Request.Form("pulje") & "', "
strSQL = strSQL & "v= '" & Request.Form("v") & "', "
strSQL = strSQL & "u= '" & Request.Form("u") & "', "
strSQL = strSQL & "t= '" & Request.Form("t") & "', "
strSQL = strSQL & "s= '" & Request.Form("s") & "', "
strSQL = strSQL & "p= '" & Request.Form("p") & "' "
strSQL = strSQL & " Where id = " & Request.Querystring("id")
Avatar billede ellebaek Nybegynder
07. juni 2003 - 15:35 #2
Altså:
<!--#include file="top.asp"-->
                    <font size="2">
<%
strSQL = "Update clan set "
strSQL = strSQL & "navn= '" & Request.Form("rnavn") & "', "
strSQL = strSQL & "tag= '" & Request.Form("tag") & "', "
strSQL = strSQL & "hp= '" & Request.Form("hp") & "', "
strSQL = strSQL & "chan= '" & Request.Form("chan") & "', "
strSQL = strSQL & "pulje= '" & Request.Form("pulje") & "', "
strSQL = strSQL & "v= '" & Request.Form("v") & "', "
strSQL = strSQL & "u= '" & Request.Form("u") & "', "
strSQL = strSQL & "t= '" & Request.Form("t") & "', "
strSQL = strSQL & "s= '" & Request.Form("s") & "', "
strSQL = strSQL & "p= '" & Request.Form("p") & "' "
strSQL = strSQL & " Where id = " & Request.Querystring("id")
Conn.Execute(strSQL)

response.write "Tillykke!<br><br>Den valgte clan er blevet redigeret!"

Conn.Close
Set Conn = Nothing
%>
<!--#include file="bund.asp"-->
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester