I wanted to do when saving pdf folder/FileName.pdf want to save the form. The following code saves only the FileName pdf
Case "new"
on error resume next
Set Upload = Server.CreateObject("Persits.Upload")
Upload.SetMaxSize 1000000, True
Upload.Codepage = 1254
Upload.OverwriteFiles = False
Upload.Save
Set File1 = Upload.Files("pdf")
Path = server.mappath("../PDF-N/")
if File1.Ext = ".pdf" or File1.Ext=".pdf" or File1.Ext=".PDF" then
File1.SaveAs Path & "\"& File1.FileName
pdf = File1.FileName
end if
metin = tirnak(Upload.form("metin"))
sql= "Insert into tblHaber(metin,pdf) values('" & metin & "', '"& pdf & "')"
conn.execute(sql)
Try removing the line:-
currently something bad can be happening but you wouldn’t be informed. Generally
On Error Resume Nextis a bad thing to have in a body of code.This isn’t going to solve your problem but it may provide some insight as to what is actually going on.