Hejsan! Varför skrivs inget ut i denna loop??
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath ("----.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
Addera = "SELECT * FROM kompis where vems = '"&gnamn&"' "
rs.Open addera, Connect, 3, 3
Function calcMyAge(strBirthDate)
strBirthDate = trim(strBirthDate)
If Len(strBirthDate) > 0 Then
calcMyAge = int(datediff("d",cDate(strBirthDate),date())/365.25)
End If
End Function
%>
(Html här....)
<%
DO Until rs.EOF OR X = 10
X=X+1
Set rs1 = Server.CreateObject("ADODB.Recordset")
Addera = "SELECT * FROM gaster where gnamn = '"&rs("vem")&"' "
rs1.Open Addera, Connect, 3, 3
if not isdate(rs1("kom")) then
datum = "Aldrig"
else
if len(Hour(rs1("kom"))) = 1 then
intHour = "0"&Hour(rs("kom"))
else
intHour = Hour(rs1("kom"))
end if
if len(Minute(rs1("kom"))) = 1 then
intMinute = "0"&Minute(rs("kom"))
else
intMinute = Minute(rs1("kom"))
end if
strDatum = intHour & ":" & intMinute
datum = FormatDateTime(rs1("kom"), vbLongDate) & " kl " & strDatum
end if
gammal = rs1("fodd")
%>
<font size="1"> </font> </font>
<tr>
<td width="68" height="12" style="border-bottom-style: solid; border-bottom-width: 1"><font face="Verdana" size="1">
<a href="javascript:<%=rs("vem")%>()"><img src="<%=rs1("bild")%>" width="55" height="72" border="1"></a></td>
<td width="200" height="12" style="border-bottom-style: solid; border-bottom-width: 1"><font face="Verdana"><b><a href="hem.asp?vem=<%=rs("gnamn")%>"><%=rs("gnamn")%></a><%if rs("sex") = "Kille" then%> P<%else%> F<%end if%><%=calcMyAge(gammal)%></b><br><br>
<b>Namn:</b> <%=rs("vem")%><br>
<b>Ålder:</b> <%=calcMyAge(gammal)%><br>
<b>Stad:</b> <%=rs1("ort")%></font></td>
<td width="341" height="12" style="border-bottom-style: solid; border-bottom-width: 1"><font face="Verdana"><br>
<b>Status:</b> <%if rs1("inne") = True then%><img border="0" src="bilder/online.jpg" width="8" height="8"><b>
<font color="#669900">Online</font></b><%else%><img border="0" src="bilder/offline.jpg" width="8" height="8"> <font color="#FF0000"><b>Offline</b></font><%end if%><br>
<b>Kategori: <%=rs("vad")%><br>
Relation: <%=rs("vad2")%><br>
Träffat irl: <%if rs("irl") = true then%>Ja<%else%>Nej<%end if%><br>
Kommentarer: <%=rs("kommentar")%></font></td>
</tr>
<%
rs.MoveNext
Loop
if rs.eof then%>
<font face="Verdana" size="1">Du har inte frågat någon än!
<%end if
rs.Close
Connect.Close
Set rs = nothing
Set Connect = nothing
%>
</table>
</td>
</tr>
</table>
</font></strong></p>
</td>
</tr>
</p>
jag kollade om rs("vem") och gnamn innehöll nått... och de gjorde de... får inget fell mess heller...
Använder access....