---
title: "Posten sparas inte och felmeddelande"
type: "forum-thread"
url: "https://www.webforum.nu/amne/databaser-sql/184782-posten-sparas-inte-och-felmeddelande"
topic: "Databaser & SQL"
topic_url: "https://www.webforum.nu/amne/databaser-sql"
author: "WebbisNet"
published: "2010-10-03T14:05:36.000Z"
updated: "2010-10-03T14:36:48.000Z"
replies: 1
views: 564
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/databaser-sql/184782-posten-sparas-inte-och-felmeddelande"
---

# Posten sparas inte och felmeddelande

## #1 — WebbisNet, 2010-10-03T14:05Z

Vad är felet med koden, fattar inte felmeddelandet direkt och inga poster sparas

```
<!-- #include virtual="/inc/dbconn.asp" -->
<html>
<head>
<title>Test</title>
</head>
<body>
<form action="skapaTabell.asp?do=post" method="post">
Namn: <input type="text" name="txtName">
<br>
E-post: <input type="text" name="txtEmail">
<br>
Meddelande:<textarea name="txtMessage"></textarea>
<br>
IP: <%=Request.ServerVariables("remote_host")%>
<br>
<input type="submit" value="Skicka">
</form>

<%if request.querystring("do") = "post" then
varName= Request.Form ("txtName")
varEmail= Request.Form ("txtEmail")
varMessage= Request.Form ("txtMessage")
varTimeDate = Now()
varIP = Request.ServerVariables("remote_host")

	SET objConn = connect()
	guestbook= "INSERT INTO guestbook"
	guestbook= guestbook & "(name,email,timedate,message,IP) "
	guestbook= guestbook & "VALUES('"& varName &"','"& varEmail &"','"& varTimeDate &"','"& varMessage &"','"& varIP &"')"

	'Response.Write guestbook
	'Response.End
	objConn.Execute guestbook
	Response.write "Du har postat "
	Response.Write "Namn: "&varName
	Response.Write "<br>Epost "&varEmail
	Response.Write "<br>Meddelande: "&varMessage
	Response.Write "<br>IP "&varIP
End if
%>
</body>
</html>
```

Felmeddelande

```
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 5.1 Driver][mysqld-5.0.90-community-nt]Incorrect string value: '\xEF\xBF\xBDm' for column 'name' at row 1

/skapaTabell.asp, line 33
```

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

## #2 — aron, 2010-10-03T14:36Z

Det blir fel på rad 33:
objConn.Execute guestbook

 '\\xEF\\xBF\\xBDm' =  "symbol found in the Unicode standard at codepoint U+FFFD in the Specials table. It is used to indicate problems when a system is not able to decode a stream of data to a correct symbol. It is most commonly seen when a font does not contain a character, but is also seen when the data is invalid and does not match any character"

<http://en.wikipedia.org/wiki/Unicode_Specials>

Problemet har att göra med vilken textkodning (utf-8/ascii) som används. Om du googlar på "\\xEF\\xBF\\xBD" hittar du säkert nått läsvärt.

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

---

Tråden på webben: https://www.webforum.nu/amne/databaser-sql/184782-posten-sparas-inte-och-felmeddelande
