Ask a Question related to ASP Database, Design and Development.
-
Geoff Wickens #1
Initial values in a form
Is it possible to create a form on a page for updating a record in a
database where the initial values in the form are taken from the database?
If so how is it best done?
Geoff Wickens
Geoff Wickens Guest
-
Can't display initial XML values
I've created a SWF that pulls information from an XML file. When one of several hundred buttons is clicked, it searches the XML file for that... -
composite control: how to assign initial values to child controls?
Hi all, I've got a question concerning composite controls: As you can see, in my CreateChildControls method I have two custom child controls,... -
Populate form values based on previous same form fields
This message is cross posted in alt.comp.lang.php & comp.lang.javascript I have a form for a user to input an establishment's hours and what time... -
Form submission fills form values with garbage
Hey all, I'm attempting to do some form processing on a server that has register_globals off, however, I've run into a confusing situation and... -
$: - where does it get its initial values?
Howdy, Where does $: get its values from? The book says that it contains an array of places to search for loaded files and that it is... -
William Tasso #2
Re: Initial values in a form
Geoff Wickens wrote:
yes> Is it possible to create a form on a page for updating a record in a
> database where the initial values in the form are taken from the
> database?
<input type="text" value="<%=rs.field(n).value%>"...>> If so how is it best done?
for example
--
William Tasso - [url]http://WilliamTasso.com[/url]
William Tasso Guest
-
Geoff Wickens #3
Re: Initial values in a form
You will probably think I am incredibly stupid, but I don't really
understand what you mean by rs.field(n).value%>
I have posted my whole code to see if it makes sense to you:
<h2 align="center">Amending a booking</h2>
<table width="100%" border="1" cellpadding="5">
<tr>
<td width="10%" height="25"><font
size="1"><b>BookingID</b></font></td>
<td width="21%" height="25"><font size="1"><b>Date</b></font></td>
<td width="20%" height="25"><font size="1"><b>Band</b></font></td>
<td width="22%" height="25"><font
size="1"><b>Venue</b></font></td>
<td width="27%" height="25"><font size="1"><b>Time</b></font></td>
</tr>
<%
d = Request.Form("eventid")
Set Catalog=Server.CreateObject("ADODB.Recordset")
Catalog.open "SELECT * FROM qrybookingsall WHERE eventID =" & d,
"DSN=calendar"
DayCalc = Catalog("ddate")
DayNo = Day(DayCalc)
strWeekDayName = WeekDayName(WeekDay(DayCalc), True, vbSunday)
intMonth = Month(daycalc)
strMonthName = MonthName(intMonth, True)
YearNo = Year(DayCalc)
Response.Write "<tr valign='top'><td><font size='1'>" & Catalog("eventID") &
"</font></td><td><font size='1'>" & strWeekDayName & " " & DayNo & " " &
strMonthName & " " & YearNo & "</font></td><td><font size='1'>" &
Catalog("band") & "</font></td><td><font size='1'>" & Catalog("venue") &
"</font></td><td><font size='1'>" & Catalog("ttime")& "</font></td></tr>"
Catalog.Close
Set Catalog=Nothing
%>
</table>
<form name="form1" method="post" action="bookingamend3.asp">
<table width="80%" border="0" cellpadding="5">
<tr>
<td width="24%">BookingID:</td>
<td width="76%">
<input type="text" name="eventiid">
</td>
</tr>
<tr>
<td width="24%">Date:</td>
<td width="76%">
<input type="text" name="ddate">
<i><font size="1">(Enter in the format 29/2/04)</font></i>
</td>
</tr>
<tr>
<td width="24%">Band:</td>
<td width="76%">
<select name="band" size="1">
<option selected>Town Band</option>
<option>Concert Brass</option>
<option>Training Band</option>
<option>!0 Piece</option>
</select>
</td>
</tr>
<tr>
<td width="24%">Time:</td>
<td width="76%">
<input type="text" name="ttime">
</td>
</tr>
<tr>
<td width="24%">Venue:</td>
<td width="76%">
<input type="text" name="venue">
</td>
</tr>
<tr>
<td width="24%" valign="top">Notes:</td>
<td width="76%">
<textarea name="notes" cols="60" rows="5"></textarea>
</td>
</tr>
<tr>
<td width="24%">Confirm:</td>
<td width="76%">
<select name="confirm" size="1">
<option selected>Yes</option>
<option>No</option>
</select>
</td>
</tr>
</table>
<p>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</p>
</form>
<p> </p>
"William Tasso" <ngx@tbdata.com> wrote in message
news:%23WfTrPUbDHA.2344@TK2MSFTNGP09.phx.gbl...> Geoff Wickens wrote:>> > Is it possible to create a form on a page for updating a record in a
> > database where the initial values in the form are taken from the
> > database?
> yes
>>> > If so how is it best done?
> <input type="text" value="<%=rs.field(n).value%>"...>
>
> for example
>
> --
> William Tasso - [url]http://WilliamTasso.com[/url]
>
>
Geoff Wickens Guest
-
William Tasso #4
Re: Initial values in a form
Geoff Wickens wrote:
> "William Tasso" <ngx@tbdata.com> wrote in message
> news:%23WfTrPUbDHA.2344@TK2MSFTNGP09.phx.gbl...> You will probably think I am incredibly stupid, but I don't really>> Geoff Wickens wrote:>>>>> Is it possible to create a form on a page for updating a record in a
>>> database where the initial values in the form are taken from the
>>> database?
>> yes
>>>>>>> If so how is it best done?
>> <input type="text" value="<%=rs.field(n).value%>"...>
>>
>> for example
>>
> understand what you mean by rs.field(n).value%>ok, more specifically using examples from your asp> I have posted my whole code to see if it makes sense to you:
> ...
<input type="text" name="venue" value="<%=Catalog("venue") %>">
does that make more sense?
--
William Tasso - [url]http://WilliamTasso.com[/url]
William Tasso Guest



Reply With Quote

