Home : Products : DBMan SQL : Discussion :

Products: DBMan SQL: Discussion: Re: [TheStone] multiple file upload: Edit Log

Here is the list of edits for this post
Re: [TheStone] multiple file upload
Okay I think I'm doing something wrong. Here's the code for my record_add_form.html

Code:


...code up here....

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica

size=
2 color="#FFFFFF"><b>Attachment(s):</b></FONT></TD>

<form name=
"myform" action="db.cgi" method=post <%if enctype%><%enctype%><%endif%>>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>



<INPUT type=
file name=attachedfile value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile2 value=""></FONT></TD>

</tr>

<tr>

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27">&nbsp;</TD>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile3 value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="27"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile4 value=""></FONT></TD>

</tr>

<tr>

<TD vAlign=
top align=right width="191" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1">&nbsp;</TD>

<TD vAlign=
top align=left width="226" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1"><FONT face=Tahoma,Arial,Helvetica size=2>

<INPUT type=
file name=attachedfile5 value=""></FONT></TD>

<TD vAlign=
top align=left width="232" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063" height="1"><FONT face=Tahoma,Arial,Helvetica size=2>



</tr>

</TBODY>

</TABLE>


And this is what I have for my record_modify_form.html

Code:


...code up here....

<TD vAlign=
top align=right width="150" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063"><FONT face=Tahoma,Arial,Helvetica

size=
2 color="#FFFFFF"><b>Attachment:</b></FONT></TD>

<TD vAlign=
top align=left width="481" bordercolor="#003063" bgcolor="#003063" bordercolorlight="#003063" bordercolordark="#003063"><FONT face=Tahoma,Arial,Helvetica size=2>

<P>

<form name=
"myform" action="db.cgi" method=post <%if enctype%><%enctype%><%endif%>>

<%if attachedfile%>


<a href=
"db.cgi?src=db&cn=attachedfile&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile%>">view</a>

<input type=
checkbox name="attachedfile_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile">

<%endif%>


<br>


<%if attachedfile2%>


<a href=
"db.cgi?src=db&cn=attachedfile2&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile2%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile2&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile2%>">view</a>

<input type=
checkbox name="attachedfile2_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile2">

<%endif%>


<br>


<%if attachedfile3%>


<a href=
"db.cgi?src=db&cn=attachedfile3&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile3%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile3&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile3%>">view</a>

<input type=
checkbox name="attachedfile3_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile3">

<%endif%>


<br>


<%if attachedfile4%>


<a href=
"db.cgi?src=db&cn=attachedfil4e&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile4%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile4&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile4%>">view</a>

<input type=
checkbox name="attachedfile4_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile4">

<%endif%>


<br>


<%if attachedfile5%>


<a href=
"db.cgi?src=db&cn=attachedfile5&do=download_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile5%>">download</a>

<a href=
"db.cgi?src=db&cn=attachedfile5&do=view_file&id=<%primary_key%>&db=<%db%>&fname=<%attachedfile5%>">view</a>

<input type=
checkbox name="attachedfile5_del" value="delete"> Delete<BR>

<%else%>


<input type=
file name="attachedfile5">

<%endif%>


I'm not sure about the modify form code since I can't add records. When I try to add a record with an attachment I get the following error:

Problems adding record: Failed to execute query: 'INSERT INTO reeCC_Files (File_Name,ForeignColName,ForeignColKey,File_MimeType,File_Size,File_Directory,ID) VALUES (?,?,?,?,?,?,NULL)' Reason: Table 'dbman.reeCC_Files' doesn't exist

If I don't attach a file then everything goes through perfectly; otherwise, the above message is displayed.


Reena

Last edited by:

Reena0330: Aug 27, 2002, 3:04 PM

Edit Log: