Din id indeholder ikke noget... Så den ser sådan her ud: <form action="blog.asp?id=&Action="Sendt" method="post"> i browseren.. Tror du ikke du skal bruge noget ala rs("id") i stedet?
<% Set Conn = Server.CreateObject("ADODB.Connection") DataSource = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("min_blog.mdb") & " ;" Conn.Open DataSource SQL_blog = "SELECT TOP 30 * FROM blog ORDER BY id DESC" Set RS = Conn.Execute(SQL_blog) IF RS.EOF THEN Response.Write "der er ingen data" ELSE WHILE NOT RS.EOF Dim strblog strblog=rs("indhold") if strblog <> "" then strblog=Replace(strblog,vbCrLf,"<br/>") else strblog = "" end if %> <h4><%=RS("overskrift")%></h4><%=RS("billede")%> <FONT SIZE="1"><%=RS("dato")%> <%=RS("forfatter")%></font> <br><br> <%=strblog%> <br>
<% Set Conn = Server.CreateObject("ADODB.Connection") DataSource = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("blog.mdb") & " ;" Conn.Open DataSource SQL_blog = "SELECT TOP 30 * FROM blog ORDER BY id DESC" Set RS = Conn.Execute(SQL_blog) IF RS.EOF THEN Response.Write "der er ingen data" ELSE WHILE NOT RS.EOF Dim strblog strblog=rs("indhold") if strblog <> "" then strblog=Replace(strblog,vbCrLf,"<br/>") else strblog = "" end if %> <h4><%=RS("overskrift")%></h4><%=RS("billede")%> <FONT SIZE="1"><%=RS("dato")%> <%=RS("forfatter")%></font> <br><br> <%=strblog%> <br>
<% if request.QueryString("Action") = "Sendt" then Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN = DSN & "DBQ=" & Server.MapPath ("kommentar.mdb") Conn.Open DSN
<% Set Conn = Server.CreateObject("ADODB.Connection") DataSource = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("blog.mdb") & " ;" Conn.Open DataSource SQL_blog = "SELECT TOP 30 * FROM blog ORDER BY id DESC" Set RS = Conn.Execute(SQL_blog) IF RS.EOF THEN Response.Write "der er ingen data" ELSE WHILE NOT RS.EOF Dim strblog strblog=rs("indhold") BlogID = rs("id") if strblog <> "" then strblog=Replace(strblog,vbCrLf,"<br/>") else strblog = "" end if %> <h4><%=RS("overskrift")%></h4><%=RS("billede")%> <FONT SIZE="1"><%=RS("dato")%> <%=RS("forfatter")%></font> <br><br> <%=strblog%> <br>
<% if request.QueryString("Action") = "Sendt" then Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN = DSN & "DBQ=" & Server.MapPath ("kommentar.mdb") Conn.Open DSN
The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. --------------------------------------------------------------------------------
Please try the following:
Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted. Click the Back button to try another link. HTTP Error 404 - File or directory not found. Internet Information Services (IIS)
Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages.
Det er fordi du lukker din conn når du gemmer kommentaren og så vil bruge den igen uden at åbne den..
Prøv lige at skifte en Sendt funktion ud med denne.. <% if request.QueryString("Action") = "Sendt" then Set Conn1 = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN = DSN & "DBQ=" & Server.MapPath ("kommentar.mdb") Conn1.Open DSN
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
<% Set Conn = Server.CreateObject("ADODB.Connection") DataSource = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("gjkigdfndhjkuuidguihrellelkvnchfugnmgih.mdb") & " ;" Conn.Open DataSource SQL_blog = "SELECT TOP 30 * FROM blog ORDER BY id DESC" Set RS = Conn.Execute(SQL_blog) IF RS.EOF THEN Response.Write "der er ingen data" ELSE WHILE NOT RS.EOF Dim strblog strblog=rs("indhold") BlogID = rs("id") if strblog <> "" then strblog=Replace(strblog,vbCrLf,"<br/>") else strblog = "" end if %> <h4><%=RS("overskrift")%></h4><%=RS("billede")%> <FONT SIZE="1"><%=RS("dato")%> <%=RS("forfatter")%></font> <br><br> <%=strblog%> <br>
<% if request.QueryString("Action") = "Sendt" then Set Conn1 = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; " DSN = DSN & "DBQ=" & Server.MapPath ("kommentarcafxrea.mdb") Conn1.Open DSN
Det ser ud til du måske ikke har includeret den fil som definere konstanterne adOpenKeyset og adLockOptimistic... prøv lige og tjek om disse er includeret... jeg husker ikke lige hvad den hedder den fil lige her for jeg har ikke IIS'en installeret...
Har lige opdaget at hvis jeg skriver en besked, så gemmes den 30 gange i databasen. Er det pga. denne: SQL_blog = "SELECT TOP 30 * FROM blog ORDER BY id DESC"
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.