Hi there
Hmm.. i have searched the forums but haven't found anything which have helped out very well.. therefore i try posting here to see if anyone can see what i've done wrong.
I basically got a <select> field on a ordinary form. Taking out all postnr values from the POSTINFO table, and put everything into the <select>.
It gives no error, just not printing anything to the field.
I have testet the database connection with GetRows and the amount of rows is correct..
using a RecordSet in this case, have tried with Array too but with same result.
Hope someone can help me out on this..
----------------------- START ------------------------
<%@ Language=VBScript %>
<%
option explicit
Dim strConnect
%>
<!--#include file="DbConnect.asp"-->
<!--metadata type="typelib" FILE= "C:\Programfiler\fellesfiler\System\ADO\msado15.dl l" -->
-------------------------------------------------------
---------------CONNECTION AND LOOP------------------
<%
Dim objCommand
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = strConnect
objCommand.CommandType =adCmdText
<td class="litentekst_gra" width="170">
<%
Response.Write "<select name='postnr' style='font-family: Helvetica, Arial, Geneva, Swiss, SunSans-Regular ; font-size: 8pt' size='1' >"
Dim rs, varArray
objCommand.CommandText = "SELECT postnr from POSTINFO"
rs = objCommand.Execute
while NOT rs.EOF
Response.Write "<option value=" & rs("postnr") & ">" & rs("postnr") & "</option>"
wend
Response.Write "</select>"
%>
</td>
------------------------------END--------------------------------