<% Set Conn = Server.CreateObject(\"ADODB.Connection\") DSN = \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath (\"/database/database.mdb\") Conn.Open DSN strSQL = \"Select * from Tekst order by id\" Set rs = Conn.Execute(strSQL) if rs.EOF then %> Ingen data I Databasen <% else %> <table border=\"1\"> <tr><td>Id:</td> <td><b>Tekst:</b></td> <% Do Until rs.EOF %> <tr> <td valign=\"top\"><%=rs(\"id\")%></td> <td valign=\"top\"><%=rs(\"tekst\")%></td> </tr> <% rs.MoveNext Loop end if %> </table> <% rs.Close Set rs = Nothing Conn.Close set Conn = Nothing %>
Fejltype: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) [Microsoft][ODBC Microsoft Access-driver] Der er for få parametre. Der var ventet 1. /a.asp, line 17
Fejltype: Microsoft OLE DB Provider for ODBC Drivers (0x80040E10) [Microsoft][ODBC Microsoft Access-driver] Der er for få parametre. Der var ventet 1. /a.asp, line 18
<% Set Conn = Server.CreateObject(\"ADODB.Connection\") DSN = \"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath (\"/database/database.mdb\") Conn.Open DSN strSQL = \"Select * from Tekst\" Set rs = Conn.Execute(strSQL) if rs.EOF then %> Ingen data I Databasen <% else %> <table border=\"1\"> <tr><td>Id:</td> <td><b>Tekst:</b></td> <% Do Until rs.EOF %> <tr> <td valign=\"top\"><%=rs(\"id\")%></td> <td valign=\"top\"><%=rs(\"tekst\")%></td> </tr> <% rs.MoveNext Loop end if %> </table> <% rs.Close Set rs = Nothing Conn.Close set Conn = Nothing %>
Synes godt om
Ny brugerNybegynder
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.