Må jeg lige se din SQL streng?
Mvh. Thomas Lykke Petersen
-------------------
Hej Thomas
Du får lige hele molevitten....
Måske giver det en mening !
NB
Fejlen opstår kun, når jeg benytter > og < tegnene !
M.v.h.
Jamse
<%
strKeyword = Trim(Request.Form("Keyword"))
If Len(strKeyword) = 0 Then
Response.Clear
Response.Redirect("search.asp")
Else
strKeyword = Replace(strKeyword,"'","''")
End If
strSQL = "SELECT * FROM perioder WHERE periode_fra<searchDate AND periode_til>searchDate LIKE '%" & strKeyword & "%' "
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("..\\db\\journal.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
Set rs = myConn.Execute(strSQL)
If Not (rs.BOF Or rs.EOF) Then
Response.Write "<center>"
Response.Write "<table border=""0"" cellspacing=""0"" width=""80%"" cellpadding=""3"" >"
Do While Not rs.EOF
Response.Write "<p><table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""border-collapse: collapse"" bordercolor=""#111111"" width=""100%"" id=""AutoNumber1""><tr><TD width=""33%"" valign=""top"">" & rs("fornavn") &" " & rs("efternavn") &" " & rs("afdeling") &" " & rs("periode_fra") &" - " & rs("periode_til") &"</TD><TD width=""5%""></TD><P></P><HR>"
rs.MoveNext
Loop
Response.Write "</FONT></table>"
Else
Response.Write "<p><FONT FACE=""Verdana, Times New Roman"" SIZE=""2"" >Din søgning gav intet resultat !"
End If
myConn.Close
Set myConn = Nothing
%>