Avatar billede babyworm Nybegynder
29. november 2005 - 13:06 Der er 1 løsning

problemer update sætning

Hej,

Jeg har lavet en update sætning som åbenbart fjerner æ,ø og å... Jeg har prøvet alt syntes jeg...

Nogen der har en ide ?

Patrick

Koden:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
Dim siteName,accssLevel,strId,mode
siteName = "Sideoversigt - Rediger indhold"
accssLevel = ""
strId     = Request.Querystring("id")
mode    = Request.Querystring("mode")
%>
<!--#include virtual="/_global/siteAccss.asp"-->
<!--#include virtual="/_global/copyright.asp"-->
<!--#include virtual="/_global/develop.asp"-->
<!--#include virtual="/_global/functions.asp"-->
<!--#include virtual="/_global/siteConfig.asp"-->
<!--#include virtual="/_global/dbconn.asp"-->
<!--#include file="fckeditor.asp" -->

<!--#include virtual="/_global/design/site_header.asp"-->
<!--#include virtual="/_global/design/site_top.asp"-->

<!--#include virtual="/_global/design/site_menu.asp"-->

<!--#include virtual="/_global/design/site_middle.asp"-->

<!--#include virtual="/_global/design/submenu_menu.asp"-->

      <td id="content">
        <h1>Instillinger for menu</h1>
<%
openConn()
If mode = "upd" Then

    strId        = Request.Form("id")
    strContext     = Replace(inputReplace(Request.Form("context")),VbCrLf,"<br>")

    strSQL = "UPDATE page SET context='" & strContext & "' WHERE page.id=" & strId
    connection.Execute(strSQL)

    Response.Redirect "default.asp"


Else

    If IsNumeric(strId) Then

        strSQL = "SELECT page.id,page.context FROM page WHERE page.id=" & strId
        Set rs = connection.Execute(strSQL)
        If Not (rs.EOF or rs.BOF) Then

            If mode = "wysiwyg" Then
%>
<form method="post" action="editor.asp?mode=upd">
<input type="hidden" name="id" value="<%=rs("id")%>">
<table border="0" cellpadding="0" cellspacing="2" class="border1" style="width:100%;">
<tr>
  <td class="tdbg" style="height:20px;">Rediger indhold:</td>
</tr>
<tr>
  <td class="tdbg1" style="text-align:center;height:600px;vertical-align:top;">
<%
Dim sBasePath
sBasePath = Request.ServerVariables("PATH_INFO")
sBasePath = Left( sBasePath, InStrRev( sBasePath, "/_samples" ) )

Dim oFCKeditor
Set oFCKeditor = New FCKeditor
oFCKeditor.BasePath    = sBasePath
oFCKeditor.Value    = rs("context")
oFCKeditor.Create "context"
%>
  </td>
</tr>
<tr>
  <td class="tdbg1" style="padding-left:5px;"><input type="submit" value="Gem ændringer" class="button"> <input type="button" value="Tilbage til oversigt" class="button" onclick="document.location.href='menu/';"> <input type="button" value="HTML editor" class="button" onclick="document.location.href='menu/editor.asp?id=<%=strId%>&mode=html';"></td>
</tr>
</table>
</form>
<%
            Else
%>
<form method="post" action="editor.asp?mode=upd">
<input type="hidden" name="id" value="<%=rs("id")%>">
<table border="0" cellpadding="0" cellspacing="2" class="border1" style="width:100%;">
<tr>
  <td class="tdbg" style="height:20px;">Rediger indhold:</td>
</tr>
<tr>
  <td class="tdbg1" style="text-align:center;height:300px;">
<textarea name="context" cols="100" rows="24" class="input">
<%=Replace(rs("context"),"<br>",VbCrLf)%>
</textarea>
  </td>
</tr>
<tr>
  <td class="tdbg1" style="padding-left:5px;"><input type="submit" value="Gem ændringer" class="button"> <input type="button" value="Tilbage til oversigt" class="button" onclick="document.location.href='menu/';"> <input type="button" value="WYSIWYG editor" class="button" onclick="document.location.href='menu/editor.asp?id=<%=strId%>&mode=wysiwyg';"></td>
</tr>
</table>
</form>
<%
            End if
        End if
    End if
End if
closeConn()
%>
      </td>

<!--#include virtual="/_global/design/site_bottom.asp"-->
Avatar billede babyworm Nybegynder
29. november 2005 - 13:35 #1
Har fundet løsning
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