Data loop

A

Amateur

Dear Sirs
I am trying to show all data from a databse in my page - but somehow I am
not coming out of the loop and the page doesn't open. Can someone tell me
what I did wrong?

Here is the code:
<table border="1" width="100%">

<tr>
<td align="left" valign="top" class="formpagetablelabel">tradeid</td></td>
<td align="left" valign="top"
class="formpagetablelabel">clearingnumber</td></td>
<td align="left" valign="top" class="formpagetablelabel">fecha</td>
<td align="left" valign="top" class="formpagetablelabel">bought</td>
<td align="left" valign="top" class="formpagetablelabel">sold</td>
<td align="left" valign="top" class="formpagetablelabel">commodity</td>
<td align="left" valign="top" class="formpagetablelabel">month</td>
<td align="left" valign="top" class="formpagetablelabel">year</td>
<td align="left" valign="top" class="formpagetablelabel">price</td>
<td align="left" valign="top" class="formpagetablelabel">contractvalue</td>
</tr>
<%
Set conntemp = server.CreateObject("adodb.Connection")
conntemp.open
"DSN=access;Database=f:\www.bellfield-barna.com\Data\transferdb.mdb"

SqlStr ="SELECT * FROM weboffsetordersbie30p ORDER BY commodity"

Set rsTable = conntemp.Execute(SqlStr)

' Cycle through the recordset, building a table row from each record.
While not rsTable.EOF
%>
<td><input class="formpagetablefield" type="text" name="tradeid" size="6"
Value="<%=trim(rsTable("tradeid"))%>"></td>
<td><input class="formpagetablefield" type="text" name="clearingnumber"
size="50" Value="<%=trim(rsTable("clearingnumber"))%>"></td>
<td><input class="formpagetablefield" type="text" name="fecha" size="50"
Value="<%=trim(rsTable("fecha"))%>"></td>
<td><input class="formpagetablefield" type="text" name="bought" size="12"
Value="<%=trim(rsTable("bought"))%>"></td>
<td><input class="formpagetablefield" type="text" name="sold" size="12"
Value="<%=trim(rsTable("sold"))%>"></td>
<td><input class="formpagetablefield" type="text" name="commodity" size="30"
Value="<%=trim(rsTable("commodity"))%>"></td>
<td><input class="formpagetablefield" type="text" name="month" size="50"
Value="<%=trim(rsTable("month"))%>"></td>
<td><input class="formpagetablefield" type="text" name="year" size="50"
Value="<%=trim(rsTable("year"))%>"></td>
<td><input class="formpagetablefield" type="text" name="price" size="12"
Value="<%=trim(rsTable("price"))%>"></td>
<td class="formpagetablelabel"><input class="formpagetablefield" type="text"
name="contractvalue" size="8"
Value="<%=trim(rsTable("contractvalue"))%>"><font class="formpagetablefield">
US$</div></td>
</tr>

....

<%
rs.MoveNext
Wend
' Close recordset
rsTable.Close
Set rsTable = Nothing

' Close connection
conntemp.Close
Set conntemp = Nothing
%>
 
A

Amateur

Hi Mike
Indeed I forgot to change. Now I did :
from rs.MoveNext
To rs.Table.movenext

I am still in this loop. I can see the background of the page but not my
table.
If it is not too much asked, do you have another idea?
 
R

Ronx

As Mike said, try changing to

rsTable.movenext
Note the lack of full point between rs and Table.
 
A

Amateur

Soyy, mistake is only here. In the Original the full point is there.
Still the same problem.
Any idea?
 
A

Amateur

Just to let you know that my last response was incorrect. In the original I
did the full point. Now it looks like: rs.Table.movenext

But I am still not coming out of the loop.
 
T

Thomas A. Rowe

It need to read as follows:

rsTable.MoveNext

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage
==============================================
Agents Real Estate Listing Network
http://www.NReal.com
==============================================
 
A

Amateur

Ronx - thank you - my god what am I stupid. I did read it hundreds of times
and still did it wrong.
OK, now I get my data - but how do I get my table rows with data under
eachother and not, like it is now, next to eachorther?
Again thank you for the patience with me.
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top