20. januar 2002 - 20:22
Der er
14 kommentarer og 1 løsning
Problem, nogen som kan finde en fejl ???
Jeg har lavet følgende kode men når jeg trykker på ret får jeg fejlen Microsoft OLE DB Provider for ODBC Drivers (0x80040E14) [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression \'SubcatID =\'. Lartret.asp, line 172 <head> <meta http-equiv=\"Content-Language\" content=\"da\"> <title>Jubii Chat\'s Havnekontor - havnekontor.dk</title> <meta http-equiv=pragma content=no-cache> <meta http-equiv=expires content=\"Mon, 18 dec 2001 23:00:00 GMT\"> <meta name=keywords content=\"chat, Chat, jubiichat, jubii chat, hvad er jubiichat, dansk chat, chat på dansk, danmarks bedste chat, chat fester, super chat, suveræn chat, danmarks største chat, største chat, romantik, dating, sex, blind date, scor\"> <meta name=description content=\"JubiiChat - Danmarks største og bedste Chat\"> <meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\"> <META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\"> <LINK REL=\"stylesheet\" HREF=\"styles/style.css\" TYPE=\"text/css\"> </head> <!-- #include file=\"incwork/RightClick/rightclick.htm\"--> <body topmargin=\"0\" leftmargin=\"0\" background=\"GFX/BG.gif\"> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"763\" id=\"AutoNumber1\" height=\"98\"> <tr> <td width=\"783\" height=\"98\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber21\" height=\"18\"> <tr> <td width=\"100%\"><!-- #include file=\"incwork/Top/Top.asp\"--></td> </tr> </table> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"766\" id=\"AutoNumber9\"> <tr> <td width=\"142\"> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"border-collapse: collapse; padding: 0\" id=\"AutoNumber10\" width=\"100%\"> <tr> <td width=\"100%\" height=\"50\" class=\"LblueU\" valign=\"top\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <% Set myConn = Server.CreateObject(\"ADODB.Connection\") myConn.Open \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/DataBank.mdb\") %> <% strSQL = \"SELECT * FROM rightframe Order By Id DESC \" Set rs1 = myConn.Execute(strSQL) %> <font face=\"Verdana\" size=\"1\" color=\"#000000\"><%=Rs1(\"Nyhed\")%> </font><p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> </td> </tr> </table> </td> <td width=\"470\" class=\"LblueU\"> <p align=\"center\"> <img border=\"0\" src=\"GFX/All/logotop1.jpg\"></td> <td width=\"140\"> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"border-collapse: collapse; \" id=\"AutoNumber12\" width=\"100%\"> <tr> <td width=\"100%\" height=\"50\" class=\"LblueU\" valign=\"top\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <% strSQL = \"SELECT * FROM leftframe Order By Id DESC \" Set rs2 = myConn.Execute(strSQL) %> <font face=\"Verdana\" size=\"1\" color=\"#000000\"><%=Rs2(\"Nyhed\")%></font></td> <% myConn.Close Set myConn = Nothing %> </tr> </table> </td> </tr> </table> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber23\" height=\"238\"> <tr> <td width=\"760%\" height=\"238\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"760\" id=\"AutoNumber24\" height=\"100%\"> <tr> <td width=\"142\" class=\"LblueUM\" valign=\"top\"><p><!-- #include file=\"m.asp\"--></td> <td valign=\"top\" style=\"border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom: 1px solid #000000\" width=\"476\" bgcolor=\"#F7EDD2\"> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"padding:0; border-collapse: collapse\" width=\"100%\" bgcolor=\"#5B7DBC\"> <tr> <td width=\"472\" style=\"border-top:1px solid #000000; border-bottom:1px solid #000000; padding:0; \" valign=\"top\" bgcolor=\"#D9E7F6\"> <!-- #include file=\"incwork/bar/bar.asp\"--></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber26\" bgcolor=\"#F7EDD2\"> <tr> <td width=\"262\" bgcolor=\"#F7EDD2\" height=\"4\"> <font size=\"1\" face=\"Verdana\"> </font> <p style=\"margin-top: 0; margin-bottom: 0\"><font face=\"Verdana\" size=\"1\"><b> Her er du: </b>Ret artikel</font></td> <td width=\"141\" bgcolor=\"#F7EDD2\" height=\"4\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <font face=\"Verdana\" size=\"1\"> <b>Styrmandsmode:</b> <% If session(\"Styrmand\") = true Then %>Yes <% end if %><% If session(\"Styrmand\") = False Then %>No<% end if %></font></td> <td width=\"64\" bgcolor=\"#F7EDD2\" valign=\"bottom\" height=\"4\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\"> <a HREF=\"java script:window.print()\"><img border=\"0\" src=\"gfx/All/ikoner/print.gif\" alt=\"Udskriv denne artikel :-)\" align=\"middle\" width=\"18\" height=\"18\"><span style=\"vertical-align: bottom\"><a href=\"java script:window.print()\">udskiv</a></span></font></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber25\" background=\"GFX/All/D/p.gif\" height=\"1\"> <tr> <td width=\"100%\"> <p style=\"margin-top: 0; margin-bottom: 0\"></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber27\"> <tr> <td width=\"100%\" height=\"100%\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber14\" height=\"100%\" bgcolor=\"#FFFFFF\"> <tr> <td width=\"100%\" height=\"473\" valign=\"top\" bgcolor=\"#F7EDD2\"> <div align=\"center\"> <center> <table border=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" id=\"AutoNumber1\"> <tr> <td width=\"100%\" valign=\"top\" style=\"padding:0; \"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" id=\"AutoNumber4\"> <tr> <td width=\"72%\" height=\"333\" valign=\"top\"> <table border=\"0\" width=\"318\" bgcolor=\"#000000\" cellspacing=\"1\" cellpadding=\"0\" height=\"178\" align=\"center\"> <tr> <td width=\"316\" bgcolor=\"#FFFFFF\" valign=\"top\"> <table width=\"66%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" style=\"border-collapse: collapse\" bordercolor=\"#111111\"> <tr> <td width=\"75%\" valign=\"top\" align=\"left\" bgcolor=\"#FFFFFF\"> <p align=\"center\" style=\"margin-top: 0; margin-bottom: 0\"> <font face=\"tahoma\" size=\"2\"><b> <font face=\"Tahoma\"> Ret Artikel</font></b></font><font face=\"Tahoma\" size=\"2\"> </font> <p align=\"center\" style=\"margin-top: 0; margin-bottom: 0\"> <a href=\"LartEdit.asp\"><font color=\"#000000\" face=\"Tahoma\" size=\"2\">Tilbage Til Oversigten</font></a></p> <hr noshade size=\"1\" color=\"#000000\" width=\"90%\" align=\"center\"> <% Response.buffer = true %> <% if mode = \"\" then Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/DataBank.mdb\") & \";UID=admin;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * from subcat where SubcatID = \" & Request.Querystring(\"SubcatID\") & \"\" rs.Open strSQL, Conn, 1, 3 %> <font face=\"Tahoma\" size=\"2\"> </font> <form method=\"post\" action=\"Lartret.asp?mode=update\"> <table width=\"317\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse: collapse\" bordercolor=\"#111111\"> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"22\"> <font face=\"Tahoma\" size=\"2\">Artikel:</font></td> <td height=\"22\" width=\"152\"> <font face=\"Tahoma\"> <input type=\"text\" name=\"Subcatname\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"Subcatname\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"11\"> <font face=\"Tahoma\" size=\"2\">Oprettet af:</font></td> <td height=\"11\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"addby\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"addby\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"6\"> <font face=\"Tahoma\" size=\"2\">Brødtext:</font></td> <td height=\"6\" width=\"152\"> <textarea cssfil=\"main.css\" picmappe=\"billeder\" style=\"behavior:url(ae/ae.htc)\" name=\"denmark\" rows=\"1\" cols=\"20\"><%=rs(\"denmark\")%></textarea></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"3\"> <font face=\"Tahoma\" size=\"2\">kategori:</font></td> <td height=\"3\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"Catid\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"catid\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"2\"> <font face=\"Tahoma\" size=\"2\">LinkDolink</font></td> <td height=\"2\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"link\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"link\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"306\" valign=\"top\" height=\"1\" colspan=\"2\"> </td> </tr> </table> <font face=\"Tahoma\"> <input type=\"text\" name=\"subcatid\" value=\"<%=rs(\"subcatID\")%>\" size=\"20\"> </font> <p align=\"center\"> <font face=\"Tahoma\"><font size=\"2\"> <br> </font> <input type=\"submit\" value=\"Ret\" name=\"knap\" class=\"bottom\"><font size=\"2\"> </font> <font size=\"2\"> </p> </form> <%end if%> </font></font> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"85%\" id=\"AutoNumber2\"> <tr> <td width=\"100%\"></td> </tr> </table> </center> </div></td> </tr> </table> </td> </tr> </table> </center> </div> </td> <td width=\"142\" class=\"LblueU\" valign=\"top\"><!-- #include file=\"incwork/ushow/Ushow.asp\"--> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"760\" id=\"AutoNumber20\" height=\"36\"> <tr> <td width=\"100%\" height=\"36\" valign=\"top\"> <p align=\"center\"><!-- #include file=\"incwork/Bottom/bottom.asp\"--></td> </tr> </table> </center> </div> <!-- #include file=\"scripts/includes/bottomwrite.htm\"--> </body> </html> <% if mode = \"update\" then %> <% Const adOpenKeyset = 1 Const adLockOptimistic = 3 Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/Databank.mdb\") & \";UID=admin;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * FROM subcat WHERE subcatid=\" & request.form(\"subcatid\") rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic %> <% rs.Update rs(\"subcatname\") = Request.form(\"subcatname\") rs(\"addby\") = Request.form(\"addby\") rs(\"denmark\") = Request.form(\"denmark\") rs(\"Catid\") = Request.form(\"Catid\") rs(\"link\") = Request.form(\"link\") rs.Update rs.Close Set rs = Nothing Conn.Close set Conn = Nothing Response.Redirect \"saveartret.asp?ID=\" & session(\"ID\") & \"\" %> <% end if %>
Annonceindlæg fra Computerworld it-jobbank
20. januar 2002 - 20:26
#1
Prøv lige med dette: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"> <html> <head> <title>Untitled</title> </head> <body> <head> <meta http-equiv=\"Content-Language\" content=\"da\"> <title>Jubii Chat\'s Havnekontor - havnekontor.dk</title> <meta http-equiv=pragma content=no-cache> <meta http-equiv=expires content=\"Mon, 18 dec 2001 23:00:00 GMT\"> <meta name=keywords content=\"chat, Chat, jubiichat, jubii chat, hvad er jubiichat, dansk chat, chat på dansk, danmarks bedste chat, chat fester, super chat, suveræn chat, danmarks største chat, største chat, romantik, dating, sex, blind date, scor\"> <meta name=description content=\"JubiiChat - Danmarks største og bedste Chat\"> <meta name=\"MSSmartTagsPreventParsing\" content=\"TRUE\"> <META HTTP-EQUIV=\"imagetoolbar\" CONTENT=\"no\"> <LINK REL=\"stylesheet\" HREF=\"styles/style.css\" TYPE=\"text/css\"> </head> <!-- #include file=\"incwork/RightClick/rightclick.htm\"--> <body topmargin=\"0\" leftmargin=\"0\" background=\"GFX/BG.gif\"> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"763\" id=\"AutoNumber1\" height=\"98\"> <tr> <td width=\"783\" height=\"98\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber21\" height=\"18\"> <tr> <td width=\"100%\"><!-- #include file=\"incwork/Top/Top.asp\"--></td> </tr> </table> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"766\" id=\"AutoNumber9\"> <tr> <td width=\"142\"> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"border-collapse: collapse; padding: 0\" id=\"AutoNumber10\" width=\"100%\"> <tr> <td width=\"100%\" height=\"50\" class=\"LblueU\" valign=\"top\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <% Set myConn = Server.CreateObject(\"ADODB.Connection\") myConn.Open \"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/DataBank.mdb\") %> <% strSQL = \"SELECT * FROM rightframe Order By Id DESC \" Set rs1 = myConn.Execute(strSQL) %> <font face=\"Verdana\" size=\"1\" color=\"#000000\"><%=Rs1(\"Nyhed\")%> </font><p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <p style=\"margin-top: 0; margin-bottom: 0\"> </td> </tr> </table> </td> <td width=\"470\" class=\"LblueU\"> <p align=\"center\"> <img border=\"0\" src=\"GFX/All/logotop1.jpg\"></td> <td width=\"140\"> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"border-collapse: collapse; \" id=\"AutoNumber12\" width=\"100%\"> <tr> <td width=\"100%\" height=\"50\" class=\"LblueU\" valign=\"top\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <% strSQL = \"SELECT * FROM leftframe Order By Id DESC \" Set rs2 = myConn.Execute(strSQL) %> <font face=\"Verdana\" size=\"1\" color=\"#000000\"><%=Rs2(\"Nyhed\")%></font></td> <% myConn.Close Set myConn = Nothing %> </tr> </table> </td> </tr> </table> <table border=\"0\" cellpadding=\"0\" cellspacing=\"3\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber23\" height=\"238\"> <tr> <td width=\"760%\" height=\"238\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"760\" id=\"AutoNumber24\" height=\"100%\"> <tr> <td width=\"142\" class=\"LblueUM\" valign=\"top\"><p><!-- #include file=\"m.asp\"--></td> <td valign=\"top\" style=\"border-left-width: 1; border-right-width: 1; border-top-width: 1; border-bottom: 1px solid #000000\" width=\"476\" bgcolor=\"#F7EDD2\"> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" style=\"padding:0; border-collapse: collapse\" width=\"100%\" bgcolor=\"#5B7DBC\"> <tr> <td width=\"472\" style=\"border-top:1px solid #000000; border-bottom:1px solid #000000; padding:0; \" valign=\"top\" bgcolor=\"#D9E7F6\"> <!-- #include file=\"incwork/bar/bar.asp\"--></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber26\" bgcolor=\"#F7EDD2\"> <tr> <td width=\"262\" bgcolor=\"#F7EDD2\" height=\"4\"> <font size=\"1\" face=\"Verdana\"> </font> <p style=\"margin-top: 0; margin-bottom: 0\"><font face=\"Verdana\" size=\"1\"><b> Her er du: </b>Ret artikel</font></td> <td width=\"141\" bgcolor=\"#F7EDD2\" height=\"4\"> <p style=\"margin-top: 0; margin-bottom: 0\"> <font face=\"Verdana\" size=\"1\"> <b>Styrmandsmode:</b> <% If session(\"Styrmand\") = true Then %>Yes <% end if %><% If session(\"Styrmand\") = False Then %>No<% end if %></font></td> <td width=\"64\" bgcolor=\"#F7EDD2\" valign=\"bottom\" height=\"4\"> <p align=\"center\"><font face=\"Verdana\" size=\"1\"> <a HREF=\"java script:window.print()\"><img border=\"0\" src=\"gfx/All/ikoner/print.gif\" alt=\"Udskriv denne artikel :-)\" align=\"middle\" width=\"18\" height=\"18\"><span style=\"vertical-align: bottom\"><a href=\"java script:window.print()\">udskiv</a></span></font></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber25\" background=\"GFX/All/D/p.gif\" height=\"1\"> <tr> <td width=\"100%\"> <p style=\"margin-top: 0; margin-bottom: 0\"></td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"98%\" id=\"AutoNumber27\"> <tr> <td width=\"100%\" height=\"100%\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"100%\" id=\"AutoNumber14\" height=\"100%\" bgcolor=\"#FFFFFF\"> <tr> <td width=\"100%\" height=\"473\" valign=\"top\" bgcolor=\"#F7EDD2\"> <div align=\"center\"> <center> <table border=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" id=\"AutoNumber1\"> <tr> <td width=\"100%\" valign=\"top\" style=\"padding:0; \"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" id=\"AutoNumber4\"> <tr> <td width=\"72%\" height=\"333\" valign=\"top\"> <table border=\"0\" width=\"318\" bgcolor=\"#000000\" cellspacing=\"1\" cellpadding=\"0\" height=\"178\" align=\"center\"> <tr> <td width=\"316\" bgcolor=\"#FFFFFF\" valign=\"top\"> <table width=\"66%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\" style=\"border-collapse: collapse\" bordercolor=\"#111111\"> <tr> <td width=\"75%\" valign=\"top\" align=\"left\" bgcolor=\"#FFFFFF\"> <p align=\"center\" style=\"margin-top: 0; margin-bottom: 0\"> <font face=\"tahoma\" size=\"2\"><b> <font face=\"Tahoma\"> Ret Artikel</font></b></font><font face=\"Tahoma\" size=\"2\"> </font> <p align=\"center\" style=\"margin-top: 0; margin-bottom: 0\"> <a href=\"LartEdit.asp\"><font color=\"#000000\" face=\"Tahoma\" size=\"2\">Tilbage Til Oversigten</font></a></p> <hr noshade size=\"1\" color=\"#000000\" width=\"90%\" align=\"center\"> <% Response.buffer = true %> <% if mode = \"\" then Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/DataBank.mdb\") & \";UID=admin;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * from subcat where SubcatID = \'\" & Request.Querystring(\"SubcatID\") & \"\'\" rs.Open strSQL, Conn, 1, 3 %> <font face=\"Tahoma\" size=\"2\"> </font> <form method=\"post\" action=\"Lartret.asp?mode=update\"> <table width=\"317\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" style=\"border-collapse: collapse\" bordercolor=\"#111111\"> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"22\"> <font face=\"Tahoma\" size=\"2\">Artikel:</font></td> <td height=\"22\" width=\"152\"> <font face=\"Tahoma\"> <input type=\"text\" name=\"Subcatname\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"Subcatname\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"11\"> <font face=\"Tahoma\" size=\"2\">Oprettet af:</font></td> <td height=\"11\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"addby\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"addby\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"6\"> <font face=\"Tahoma\" size=\"2\">Brødtext:</font></td> <td height=\"6\" width=\"152\"> <textarea cssfil=\"main.css\" picmappe=\"billeder\" style=\"behavior:url(ae/ae.htc)\" name=\"denmark\" rows=\"1\" cols=\"20\"><%=rs(\"denmark\")%></textarea></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"3\"> <font face=\"Tahoma\" size=\"2\">kategori:</font></td> <td height=\"3\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"Catid\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"catid\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"154\" valign=\"top\" height=\"2\"> <font face=\"Tahoma\" size=\"2\">LinkDolink</font></td> <td height=\"2\" width=\"152\"> <font face=\"Tahoma\"> <input name=\"link\" maxlength=\"100\" class=\"bottom\" value=\"<%=rs(\"link\")%>\" size=\"28\"></font></td> </tr> <tr> <td class=\"skrift\" width=\"306\" valign=\"top\" height=\"1\" colspan=\"2\"> </td> </tr> </table> <font face=\"Tahoma\"> <input type=\"text\" name=\"subcatid\" value=\"<%=rs(\"subcatID\")%>\" size=\"20\"> </font> <p align=\"center\"> <font face=\"Tahoma\"><font size=\"2\"> <br> </font> <input type=\"submit\" value=\"Ret\" name=\"knap\" class=\"bottom\"><font size=\"2\"> </font> <font size=\"2\"> </p> </form> <%end if%> </font></font> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"85%\" id=\"AutoNumber2\"> <tr> <td width=\"100%\"></td> </tr> </table> </center> </div></td> </tr> </table> </td> </tr> </table> </center> </div> </td> <td width=\"142\" class=\"LblueU\" valign=\"top\"><!-- #include file=\"incwork/ushow/Ushow.asp\"--> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </center> </div> <div align=\"center\"> <center> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" width=\"760\" id=\"AutoNumber20\" height=\"36\"> <tr> <td width=\"100%\" height=\"36\" valign=\"top\"> <p align=\"center\"><!-- #include file=\"incwork/Bottom/bottom.asp\"--></td> </tr> </table> </center> </div> <!-- #include file=\"scripts/includes/bottomwrite.htm\"--> </body> </html> <% if mode = \"update\" then %> <% Const adOpenKeyset = 1 Const adLockOptimistic = 3 Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open \"PROVIDER=MSDASQL;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=\" & Server.MapPath(\"Data/Databank.mdb\") & \";UID=admin;PWD=;\" Set rs = Server.CreateObject(\"ADODB.RecordSet\") strSQL = \"Select * FROM subcat WHERE subcatid=\" & request.form(\"subcatid\") rs.Open strSQL, Conn, adOpenKeyset, adLockOptimistic %> <% rs.Update rs(\"subcatname\") = Request.form(\"subcatname\") rs(\"addby\") = Request.form(\"addby\") rs(\"denmark\") = Request.form(\"denmark\") rs(\"Catid\") = Request.form(\"Catid\") rs(\"link\") = Request.form(\"link\") rs.Update rs.Close Set rs = Nothing Conn.Close set Conn = Nothing Response.Redirect \"saveartret.asp?ID=\" & session(\"ID\") & \"\" %> <% end if %> </body> </html> //>Rune
20. januar 2002 - 20:34
#2
nu siger den Microsoft OLE DB Provider for ODBC Drivers (0x80040E07) [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. /New_Havnekontor/Lartret.asp, line 180
20. januar 2002 - 20:37
#3
hm.. ok.. 2 sek..
20. januar 2002 - 20:38
#4
jamen så er det fordi at der er nogen data\'er i din QueryString! //>Rune
20. januar 2002 - 20:42
#5
ja - selvfølgeligb er der data\'er ?
20. januar 2002 - 20:43
#6
den ser således ud... Lartret.asp?subcatid=2
20. januar 2002 - 20:45
#7
alså problemet opsæt først når jeg trykker ret, den kan sagtens skrive de forskellige ting i felterne
20. januar 2002 - 20:49
#8
Tilbage til første fejl: Syntax error (missing operator) in query expression \'SubcatID =\'. Den optræder fordi sætningen: strSQL = \"Select * from subcat where SubcatID = \" & Request.Querystring(\"SubcatID\") & \"\" er forkert. Det skal være: strSQL = \"Select * from subcat where SubcatID = \" & Request.Form(\"SubcatID\") & \"\" fordi SubcatID kommer fra et felt i den kaldende form.
20. januar 2002 - 21:08
#9
coltau> Nej, for det er en QueryString han sender! //>Rune
20. januar 2002 - 21:15
#10
Hvad gør jeg, nogen som evt har et script som kan bruges til at rediger eksisterende poster i en database ?
20. januar 2002 - 21:17
#11
sql = \"Insert Into Bruger(Tabel1, Tabel2, Tabel3, Tabel4,Tabel5, Tabel6, Tabel7, dato) Values(\'\" sql = sql & Session(\"Tabel1\") & \"\',\'\" sql = sql & Session(\"Tabel2\") & \"\',\'\" sql = sql & Session(\"Tabel3\") & \"\',\'\" sql = sql & Session(\"Tabel4\") & \"\',\'\" sql = sql & Session(\"Tabel5\") & \"\',\'\" sql = sql & Session(\"Tabel6\") & \"\',\'\" sql = sql & Session(\"Tabel7\") & \"\',\'\" sql = sql & Now(\"dato\") & \"\')\" conn.execute(strSQL) //>Rune
20. januar 2002 - 21:18
#12
DOH... *G* her var det: strSQL = \"UPDATE tabel SET efternavn = \'\" & Text1.Text & \"\' WHERE navn = \'\" & Request.Form(\"inputbox\") & \"\'\" Conn.Execute (strSQL) Conn.Close //>Rune
20. januar 2002 - 21:27
#13
Thx 4 Poinz //>Rune
20. januar 2002 - 21:54
#14
I følge koden er det ikke en QueryString. - Men et felt i en form. Jeg tror ikke på at det virker endnu. Hvis i har ret går jeg i seng. !
20. januar 2002 - 22:01
#15
coltau> *LOL*
Kurser inden for grundlæggende programmering