03. april 2001 - 19:42Der er
15 kommentarer og 1 løsning
Problemer med visning af \"tom\" side...
Hej På min side kan brugere selv uploade dokumenter, filer etc. Mit problem er, at hvis der ikke er uploaded noget under en bestemt kategori, vises siden ikke. Hvad kan jeg indsætte så kategori siden hvor der ikke er uploaded noget på viser teksten i body: \"endnu ikke nogle dokumenter i denne kategori\"
se mit visningsscript: <%@ LANGUAGE=\"VBSCRIPT\" %> <% Option Explicit %> <!-- #INCLUDE VIRTUAL=\"/adovbs.inc\" --> <% Dim Conn, RS, Kategori, Tittel, Beskrivelse, Sprog, Vurdering, Forfatter Kategori = CInt(Request(\"Kategori\")) Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open Application(\"fildb\") Set RS = Server.CreateObject(\"ADODB.Recordset\") RS.Open \"SELECT ID, FILENAME, Kategori, Tittel, Beskrivelse, Sprog, Vurdering, Forfatter FROM TFiles WHERE Kategori=\"& Kategori &\"\", Conn %> <% dim sti select case RS(\"SPROG\") case 1 sti=\"/billeder/forside/denmark.gif\" case 2 sti=\"/billeder/forside/Sweden.gif\" case 3 sti=\"/billeder/forside/Norway.gif\" case 4 sti=\"/billeder/forside/unitedkingdom.gif\" case 5 sti=\"/billeder/forside/spain.gif\"
<!-- Her er det reele indhold af siden. --> <% While NOT RS.eof Response.write \"<p><table border=\"\"0\"\" width=\"\"90%\"\" rowspan=\"\"0\"\" bgcolor=\"\"#18949C\"\" style=\"\"border: 1 solid #FFFFFF\"\">\" Response.Write \"<td><img src=\"\"\"& sti &\"\"\"> <a href=\"\"/upload/DownloadDB.asp?ID=\"& RS(\"ID\") &\"\"\">\" Response.Write RS(\"FILENAME\") Response.Write \"</a></b>\" Response.Write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">Titel: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">\" & RS (\"Tittel\") Response.Write \" <b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">Beskrivelse: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">\" & RS (\"Beskrivelse\") Response.write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">Evt. vurdering: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">\" & RS (\"Vurdering\")
Response.write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">Forfatter: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">\" & RS (\"Forfatter\") Response.write \"</td></p>\" RS.Movenext Wend Response.write \" \" RS.Close Set RS = NOTHING Conn.Close Set Conn = NOTHING %>
I dette særtema ser vi på, hvordan cloud og AI bliver fundamentet for virksomhedernes digitale forretning, og hvordan de nye muligheder for automatisering og forretningsværdi kan udnyttes uden at miste overblik, sikkerhed og menneskelig kontrol.
Hej igen - ja desværre. Samme svar som hvis en side ikke findes... Men lige såsnart jeg uploader bare en enkelt opgave under en kategori (eksempelvis historie) og derefter vægler kategorien historie - vises siden.
<% if not rs.eof then dim sti select case RS(\"SPROG\") case 1 sti=\"/billeder/forside/denmark.gif\" case 2 sti=\"/billeder/forside/Sweden.gif\" case 3 sti=\"/billeder/forside/Norway.gif\" case 4 sti=\"/billeder/forside/unitedkingdom.gif\" case 5 sti=\"/billeder/forside/spain.gif\"
Nu fik jeg så en fejl i bunden... *************** Microsoft VBScript compilation error \'800a03f6\'
Expected \'End\'
/upload/Download.asp, line 95 ********************* linie 95 er set conn=nothing ************************* Wend Response.write \" \" RS.Close Set RS = NOTHING Conn.Close Set Conn = NOTHING %>
Hej Netsrac Beklager forsinkelsen... Her kommer det: <%@ LANGUAGE=\"VBSCRIPT\" %> <% Option Explicit %> <!-- #INCLUDE VIRTUAL=\"/adovbs.inc\" -->
<% Dim Conn, RS, Kategori, Tittel, Beskrivelse, Sprog, Vurdering, Forfatter Kategori = CInt(Request(\"Kategori\")) Set Conn = Server.CreateObject(\"ADODB.Connection\") Conn.Open Application(\"fildb\") Set RS = Server.CreateObject(\"ADODB.Recordset\") RS.Open \"SELECT ID, FILENAME, Kategori, Tittel, Beskrivelse, Sprog, Vurdering, Forfatter FROM TFiles WHERE Kategori=\"& Kategori &\"\", Conn %>
<% if not rs.eof then dim sti select case RS(\"SPROG\") case 1 sti=\"/billeder/forside/denmark.gif\" case 2 sti=\"/billeder/forside/Sweden.gif\" case 3 sti=\"/billeder/forside/Norway.gif\" case 4 sti=\"/billeder/forside/unitedkingdom.gif\" case 5 sti=\"/billeder/forside/spain.gif\"
<!-- Her er det reele indhold af siden. --> <% if rs.eof then response.write (\"kategori tom\") end if
While NOT RS.eof Response.write \"<p><table border=\"\"0\"\" width=\"\"90%\"\" rowspan=\"\"0\"\" bgcolor=\"\"#18949C\"\" style=\"\"border: 1 solid #FFFFFF\"\">\" Response.Write \"<td><img src=\"\"\"& sti &\"\"\"> <a href=\"\"/upload/DownloadDB.asp?ID=\"& RS(\"ID\") &\"\"\">\" Response.Write RS(\"FILENAME\") Response.Write \"</a></b>\" Response.Write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">Titel: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">\" & RS (\"Tittel\") Response.Write \" <b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">Beskrivelse: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"2\"\" color=\"\"#000000\"\">\" & RS (\"Beskrivelse\") Response.write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">Evt. vurdering: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">\" & RS (\"Vurdering\")
Response.write \"<BR><b><FONT FACE =\"\"Arial, VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">Forfatter: </FONT></b><FONT FACE =\"\"VERDANA, Times New Roman\"\" SIZE=\"\"1\"\" color=\"\"#000000\"\">\" & RS (\"Forfatter\") Response.write \"</td></p>\" RS.Movenext Wend Response.write \" \" RS.Close Set RS = NOTHING Conn.Close Set Conn = NOTHING %>
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.