Jeg har 2 filer...den ene er connect og den anden er min database
viser:
--- ### "Connect.asp" :
<%
dim oConn
Set oConn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data
Source=\\premfs7\sites\premium2\haamann\database\data.mdb;" & _
"Persist Security Info=False"
oConn.Open(sConnection)
%>
--- ### "news.asp" :
<html>
<title>News</title>
<head>
</head>
<BODY BGCOLOR=#ffffff>
<%
<!-- #Include
file="
http://haamann.brinkster.net/services/connect.asp" -->
dim oConn, strSQL
strSQL = "Select * From personer Order by ID Desc"
Set rs = oConn.Execute(strSQL)
Do
' Nyheden
Response.Write "<font face=Verdana size=1 color=4082A4><b><u>"
Response.Write rs("dato") &
"</u> - <u>"
Response.Write rs("overskrift") & "</font></b></u><br>"
Response.Write "<font face=Verdana size=1 color=000000>"
Response.Write rs("news") & "</font><br><br>"
rs.MoveNext
Loop While Not rs.EOF
oConn.Close
Set oConn = Nothing
%>
</body>
</html>
Kan i finde fejlen?
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP?
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials