Your browser does not seem to support CSS. If images appear below, please disregard them.
toggle
February
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
Sponsored Links
Latest Postings
Topic Options
Rate This Topic
#17650 - 10/27/02 09:18 PM Basic ASP/ADO/HTML problem
Joined: Oct 2002
Posts: 10
Satori Offline
Junior Member
Satori Offline
Junior Member

Joined: Oct 2002
Posts: 10
San Antonio, Texas
Okay, so I'm having some trouble! I've never jacked with ADO before today, and so I started playing with it. No problem... created a very basic access database with a single table with some fields, and I can read from it and pipe the output to tables no problem. Yay!

Now, I'm trying to get the first field in each record that is displayed to have the data on a button, and where clicking the button will take you to a new page with a form that lets you edit the database. Now, the hard part ought to be the DB edit itself, but I've got that part working alright. I'm screwing up a really simple IF statement, and it's pissing me off. No matter what I do, the display isn't on a button, which means that I can't do action="edit.asp" and actually get to my edit script.... Here's the relevant lines:

Code:
<tr>
<form method="post" action="edit.asp">
<%for each x in rs.Fields
      if x.name="no" then%>
           <td><input type="submit" name="no" value="<%=x.value%>"></td>
      <%else%>
           <td><%Response.Write(x.value)%></td>
      <%end if
next
%>
</form>
<%rs.MoveNext%>
</tr>
What am I not doing correctly here? The display is just the value of the "no" field in the table, never the button with the value on it as text linking me to my other script.

Help?

Top
Sponsored Links
#17651 - 10/27/02 10:11 PM Re: Basic ASP/ADO/HTML problem
Joined: Mar 2002
Posts: 1,273
SilentRage Offline
DollarDNS Owner
SilentRage Offline
DollarDNS Owner

Joined: Mar 2002
Posts: 1,273
OH, USA
Code:
<tr>
<form method="post" action="edit.asp">
<%
for each x in rs.Fields
    if x.name="no" then
        Response.Write "<td><input type=""submit"" name=""no"" value=""" & x.value & """></td>"
    else
        Response.Write "<td>" & x.value & "</td>"
    end if
    rs.MoveNext
next
%>
</form>
</tr>
Give that a shot.


Domain Registration, Hosting, Management
http://www.dollardns.net
Top

Member Spotlight
Gremelin

Gremelin
Portland, OR; USA
Posts: 7,194
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums46
Topics43,982
Posts79,156
Members2,157
Most Online1,567
Apr 25th, 2010
Top Posters(All Time)
UGN Security 37,145
Gremelin 7,194
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Newest Members
Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit, boa
2157 Registered Users
Who's Online Now
0 registered members (), 1 guest and 1 spider.
Latest News