Hallo, suche dringend Hilfe, komme einfach nicht weiter. Wer kann mir sagen was ich falsch mache? In der Listbox wird auf jeden Fall kein Datensatz angezeigt, obwohl die DSN korrekt ist und keine Fehlermeldung auftaucht. im Anhang der Code:
<html>
<%
Dim db
Dim rs
Dim sql
' Datenbank öffnen
set db = Server.CreateObject("ADODB.Connection")
db.Open "dsn=AFI-DB"
' Tabelleninhalt anzeigen:
sql = "select FullName from tblAssessenments"
set rs = db.Execute(sql)%>
<head>
<title>Neue Seite 1</title>
</head>
<body>
<form method="POST" action="">
<p><font size="6" face="Arial Black" color="#FF0000">AFI - Datenbank</font></p>
<table border="1" width="100%">
<tr>
<td width="25%" rowspan="5">
<select name="Elementname">
<% if not rs.EOF then rs.MoveFirst
'counter = 1
do until rs.EOF 'or counter>count
'nr = (counter mod 2)
for each feld in rs.fields
Response.Write "<option>" & feld.value & "</option>"
next
'counter = counter + 1
rs.MoveNext
loop
' Datenbank schließen
db.Close
set db=Nothing
set rs=Nothing
%>
</select>
</td>
<td width="13%"><input type="submit" value="show report" name="B3"></td>
<td width="18%"><input type="radio" name="R1" value="V12">alle AFIs</td>
<td width="19%" rowspan="2"> </td>
<td width="25%" rowspan="2"><input type="submit" value="My open AFIs" name="B4">
<p><input type="submit" value="Edit AFI" name="B5"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="18%"><input type="radio" value="V13" checked name="R1">offene
AFIs</td>
</tr>
<tr>
<td width="13%"> </td>
<td width="18%"><input type="radio" name="R1" value="V14">closed AFIs</td>
<td width="19%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="31%" colspan="2"> </td>
<td width="19%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="31%" colspan="2"> </td>
<td width="19%"><input type="submit" value="Abschicken" name="B1"></td>
<td width="25%"><input type="reset" value="Zurücksetzen" name="B2"></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>
<html>
<%
Dim db
Dim rs
Dim sql
' Datenbank öffnen
set db = Server.CreateObject("ADODB.Connection")
db.Open "dsn=AFI-DB"
' Tabelleninhalt anzeigen:
sql = "select FullName from tblAssessenments"
set rs = db.Execute(sql)%>
<head>
<title>Neue Seite 1</title>
</head>
<body>
<form method="POST" action="">
<p><font size="6" face="Arial Black" color="#FF0000">AFI - Datenbank</font></p>
<table border="1" width="100%">
<tr>
<td width="25%" rowspan="5">
<select name="Elementname">
<% if not rs.EOF then rs.MoveFirst
'counter = 1
do until rs.EOF 'or counter>count
'nr = (counter mod 2)
for each feld in rs.fields
Response.Write "<option>" & feld.value & "</option>"
next
'counter = counter + 1
rs.MoveNext
loop
' Datenbank schließen
db.Close
set db=Nothing
set rs=Nothing
%>
</select>
</td>
<td width="13%"><input type="submit" value="show report" name="B3"></td>
<td width="18%"><input type="radio" name="R1" value="V12">alle AFIs</td>
<td width="19%" rowspan="2"> </td>
<td width="25%" rowspan="2"><input type="submit" value="My open AFIs" name="B4">
<p><input type="submit" value="Edit AFI" name="B5"></td>
</tr>
<tr>
<td width="13%"> </td>
<td width="18%"><input type="radio" value="V13" checked name="R1">offene
AFIs</td>
</tr>
<tr>
<td width="13%"> </td>
<td width="18%"><input type="radio" name="R1" value="V14">closed AFIs</td>
<td width="19%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="31%" colspan="2"> </td>
<td width="19%"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="31%" colspan="2"> </td>
<td width="19%"><input type="submit" value="Abschicken" name="B1"></td>
<td width="25%"><input type="reset" value="Zurücksetzen" name="B2"></td>
</tr>
</table>
</form>
<p> </p>
</body>
</html>