Hvordan får jeg lige filnavnet og overskrift ind i min access DB?
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=d:\home\XXXXXXXX\db\jones.mdb"
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
On Error Resume Next
Upload.SetMaxSize 120576 ' Limit files to 120kb
Count = Upload.Save("d:\home\XXXXXXXX\www\jones\uploads")
%>
<HTML>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<% If Err <> 0 Then %>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<H3>The following error occured while uploading:</h3>
</FONT>
<FONT SIZE=3 FACE="Arial" COLOR=#FF2020>
<h2>"<% = Err.Overskrift %>"</h2>
</FONT>
<% Else %>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<h2>Success! <% = Count %> file(s) have been uploaded.</h2>
</FONT>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>
<TD><B>Image:</B></TD>
<% If Count > 0 Then %>
<%
Set File = Upload.Files(1)
If File.ImageType = "GIF" or File.ImageType = "JPG" or
File.ImageType = "PNG" Then %>
<TD ALIGN=CENTER><IMG SRC="uploads/<% = File.FileName%>"><BR><%
= File.OriginalPath%><BR>
(<% = File.ImageWidth %> x <% = File.ImageHeight %> pixels)
</TD>
<% Else %>
<TD><% = File.OriginalPath %></TD>
<% End If %>
<% Else %>
<TD>File not selected.</TD>
<% End If %>
<TR>
<TD><B>Overskrift:</B></TD><TD><% = Upload.Form("Overskrift")
%> </TD><TR>
<TD></TD>
<TD></TD>
</TABLE>
<% End If %>
</CENTER>
</BODY>
</HTML>
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials