I dagsläget med denna kod så visas ju ingenting om ingen info i databasen finns. Jag skulle istället vilja att det var så här: finns det ingen info i databasen så skall bilden notour.jpg visas istället! Förstår att det ska vara något med "else" men får inte till det... Någon som kan koden :q
<%
Session.LCID = 1033
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("data/mc.mdb")
Set objRS = Conn.Execute ("select top 1 city, datum, country, venue from tour WHERE datum>=date() order by datum")
If not objRS.EOF then
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td> </td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='graphic/next_show.gif'></td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td> </td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='55'>Country</td><td width='20'> </td><td width='150'>" & replace(objRS("country"),vbcrlf,"") & "</td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='55'>City</td><td width='20'> </td><td width='150'>" & objRS("city") & "</td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='55'>Venue</td><td width='20'> </td><td width='150'>" & replace(objRS("venue"),vbcrlf,"") & "</td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='55'>Date</td><td width='20'> </td><td width='150'>" & FormatDateTime(objRS("datum"),1) & "</td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td> </td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td>Constantly on the road! Check out the <a href='?p=2'>tour section</a> and find out when Melody Club is coming to blow up your town.</td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td> </td></tr></table>"
response.write "<table border='0' cellpadding='0' cellspacing='0'><tr><td><img src='graphic/hr_225.gif'></td></tr></table>"
End if
objRS.Close
Set objRS = Nothing
Conn.Close
set Conn = Nothing
%>