Mærkelig fejl med telefonnr.
Jeg henter data ud af en MS db, men når jeg forsøger at få telefonnr med får jeg en underlig fejl.Fornavn Efternavn Adresse Postnr By Klasser Tlf
Lars Dahl Abildgaardsvej 10. 1mf 2830 Virum Onroad 1:8 ADODB.Recordset error \'800a0cc1\'
Item cannot be found in the collection corresponding to the requested name or ordinal.
Her er koden:
<%
Option Explicit
Response.Expires = -1000
Dim oConn
Dim oRS
Dim sSQL
Dim sColor
Set oConn = Server.CreateObject(\"ADODB.Connection\")
oConn.Open(\"DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=\" & Server.MapPath(\"HRCR.mdb\"))
sSQL = \"SELECT Fornavn, Efternavn, Adresse, Postnr, By, Klasser FROM medlem\"
Set oRS = oConn.Execute(sSQL)
Response.Write(\"<table border=1 cellpadding=1 cellspacing=1 style=\'font-family:arial; font-size:10pt;\'>\")
Response.Write(\"<tr bgcolor=black style=\'color:white;\'><td>Fornavn</td>\")
Response.Write(\"<td>Efternavn</td>\")
Response.Write(\"<td>Adresse</td>\")
Response.Write(\"<td>Postnr</td>\")
Response.Write(\"<td>By</td>\")
Response.Write(\"<td>Klasser</td>\")
Response.Write(\"<td>Tlf</td>\")
sColor = \"white\"
Do While NOT oRS.EOF
If sColor = \"silver\" Then
sColor = \"white\"
Else
sColor = \"silver\"
End If
Response.Write(\"<tr bgcolor=\'\" & sColor & \"\'>\")
Response.Write(\"<td>\" & oRS(\"Fornavn\").Value & \"</td>\")
Response.Write(\"<td>\" & oRS(\"Efternavn\").Value & \"</td>\")
Response.Write(\"<td align=right>\" & oRS(\"Adresse\").Value & \"</td>\")
Response.Write(\"<td align=right>\" & oRS(\"Postnr\").Value & \"</td>\")
Response.Write(\"<td align=right>\" & oRS(\"By\").Value & \"</td>\")
Response.Write(\"<td align=right>\" & oRS(\"Klasser\").Value & \"</td>\")
Response.Write(\"<td align=right>\" & oRS(\"tlf\").Value & \"</td>\")
oRS.MoveNext
Loop
Response.Write(\"</table><br><br>\")
oConn.Close
Set oRS = Nothing
Set oConn = Nothing
%>
/tabel.asp, line 38
