On May 12, 3:47 pm, r...@rediffmail.com wrote:
Quote:
I am storing the physical path of images, along with 3 more columns,
in a MS-Access DB table. I want to provide users the option to change
this physical image path (as well as the records in the other columns)
for which I am using the *File* Form element.
>
The column under which the physical paths are stored is the 4th column
in the DB table.
>
Users first come to a page that displays the distinct records existing
in column1 in the above mentioned DB table in a dropdown select list.
When an option is selected by the user & the Form is posted, the next
page would retrieve the records from the DB table depending upon what
a user selected from the dropdown select list & display them to the
user in textboxes so that they can edit the records.
>
<%
Dim objConn
Set objConn=Server.CreateObject("ADODB.CONNECTION")
'ConnectionString
objConn.Open
>
Dim strSQL
strSQL="SELECT * FROM MyTable WHERE Col1='" &
Request.Form("selectlistvalue") & "'"
>
Dim objRS
Set objRS=Server.CreateObject("ADODB.RECORDSET")
objRS.Open strSQL,objConn
%>
<form>
<input type=text name="col1" value="<%= objRS("Col1") %>">
<input type=text name="col2" value="<%= objRS("Col2") %>">
<input type=text name="col3" value="<%= objRS("Col3") %>">
<input type=file name="col4" value="<%= objRS("Col4") %>">
</form>
>
The problem is, unlike the textboxes, the *File* Form field doesn't
display the physical path (Col4) in the textbox that accompanies the
*File* Form element.
>
Any idea how do I make the textbox in the *File* Form field show the
record from Col4 (i.e. the physical path) from the DB table like how
the other 3 textboxes display their respective records?
ADDENDUM:
-------------
The same thing happens if a textbox field is replaced with a textarea
Form element. For e.g. using the following code
<textarea name="col2" col=20 rows=10 value="<%= objRS("Col2") %>"></
textarea>
the textarea remains blank!