webForumDet fria alternativet

aspSmartUpload.. Kan inte spara

ASPur ASP

1 svar · 293 visningar · startad av Holmstroem

Medlem sedan feb. 200532 inlägg
Frågan#1
<%
   Dim mySmartUpload
   Dim intCount

   Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
   
   mySmartUpload.Upload
   Set Files = mySmartUpload.Files("file")
   intCount = mySmartUpload.Save("/portfolio")

   If Err Then
      Response.redirect("uploadform.asp?do=error")
   Else%>

   ' DATABASKOPPLING HÄR

   <%
		file_name = mySmartUpload.Form("name")
		file_date = date()
		file_description = mySmartUpload.Form("description")
		file_cathegory = mySmartUpload.Form("cathegory")

		SQL = "INSERT INTO portfolio (file_name, file_date, file_description, file_cathegory) VALUES ('" & file_name & "', '" & file_date & "', '" & file_description & "', '" & file_cathegory & "')"

		objConn.Execute(SQL)
     Response.redirect("uploadform.asp?do=done")
   End If
%>

Får felmeddelandet:

aspSmartUpload.File error '80040460'

Unable to save file (Error 1120)

/index/upload.asp, line 10

Line 10 = intCount = mySmartUpload.Save("/portfolio")

Tacksam för svar : )

Medlem sedan feb. 200532 inlägg
#2

fixat... slutkoden blev:

<%
   Dim mySmartUpload
   Dim intCount

   Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
   
   mySmartUpload.Upload
   Set Files = mySmartUpload.Files("file")
   [B]intCount = mySmartUpload.Save("portfolio")[/B]

   If Err Then
      Response.redirect("uploadform.asp?do=error")
   Else%>

   ' DATABASKOPPLING HÄR

   <%
		file_name = mySmartUpload.Form("name")
		file_date = date()
		file_description = mySmartUpload.Form("description")
		file_cathegory = mySmartUpload.Form("cathegory")

		SQL = "INSERT INTO portfolio (file_name, file_date, file_description, file_cathegory) VALUES ('" & file_name & "', '" & file_date & "', '" & file_description & "', '" & file_cathegory & "')"

		objConn.Execute(SQL)
     Response.redirect("uploadform.asp?do=done")
   End If
%>
122 ms totalt · 3 externa anrop · v20260731065814-full.4bcf49fe
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
119 ms — hämta tråd, inlägg och bilagor (db)