Pure ASP Upload 3 Support Product Page
i can upload to the folder but cannot insert to database using flash uploader
Reported 30 Jun 2012 13:31:58
1
has this problem
30 Jun 2012 13:31:58 Jacque D posted:
here is my code<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include virtual="/connectiondb" --> <!--#include virtual="/ScriptLibrary/incPU3Class.asp" --> <!--#include virtual="/ScriptLibrary/incPU3Utils.asp" --> <%'*** Pure ASP File Upload 3.0.17 ' Process form upload1 Dim pau, DMX_uploadAction, UploadRequest, UploadQueryString, pau_thePath, pau_nameConflict, pau_saveWidth, pau_saveHeight Set pau = new PureUpload pau.ScriptLibrary = "../ScriptLibrary" pau.TimeOut = 120 pau.ConflictHandling = "uniq" pau.StoreType = "file" pau.UploadFolder = """uploads2012""" pau.AllowedExtensions = "GIF,JPG,JPEG,BMP,PNG" ' "images" pau.MaxFileSize = 1000 pau.ProcessUpload pau.SaveAll if pau.Done then SetUploadFormRequest "image1",pau.Fields("image1").FileName end if %> <%Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (UploadQueryString <> "") Then MM_editActionMM_editAction = MM_editAction & "?" & Server.HTMLEncode(UploadQueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <%' IIf implementation Function MM_IIf(condition, ifTrue, ifFalse) If condition = "" Then MM_IIf = ifFalse Else MM_IIf = ifTrue End If End Function %> <%If (CStr(UploadFormRequest("MM_insert")) = "upload1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_techland_STRING MM_editCmd.CommandText = "INSERT INTO images ( image1) VALUES (?)" MM_editCmd.Prepared = true ' MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 5, 1, -1, MM_IIF(UploadFormRequest("adid"), UploadFormRequest("adid"), null)) ' adDouble MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 400, UploadFormRequest("image1")) ' adLongVarChar MM_editCmd.Execute MM_editCmd.ActiveConnection.Close End If End If %> <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <script type="text/javascript"><%=pau.generateScriptCode()%></script> <script src="../ScriptLibrary/incPU3.js" type="text/javascript"></script> </head> <body> <form ACTION="<%=MM_editAction%>" METHOD="POST" name="upload1"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="250" height="150" id="upload1" align="middle"> <param name="FlashVars" value="<%=pau.FlashVars()%>" /> <param name="movie" value="dmxPureUpload.swf" /> <param name="quality" value="best" /> <param name="scale" value="noscale" /> <param name="wmode" value="transparent" /> <embed src="dmxPureUpload.swf" id="upload1" quality="best" flashvars="<%=pau.FlashVars()%>" scale="noscale" wmode="transparent" type="application/x-shockwave-flash" width="250" height="150" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <input type="hidden" name="adid" value="1" /> <input name="image1" type="hidden" value="" /> <input type="hidden" name="MM_insert" value="upload1"> </form> </body> </html>
Replies
Replied 02 Jul 2012 14:13:35
02 Jul 2012 14:13:35 Jacque D replied:
i can upload images to the folder but cannot insert a record to database using flash uploader plese see code above
thank you
thank you
Replied 06 Jul 2012 15:24:58
06 Jul 2012 15:24:58 Jacque D replied:
any body???
Replied 09 Jul 2012 07:31:05
09 Jul 2012 07:31:05 Teodor Kuduschiev replied:
Hello,
Can you please explain your problem a little more detailed? Please also read the manual of Pure ASP Upload 3 - it is described there how to upload images and store their names into a database: www.dmxzone.com/go/12067
Can you please explain your problem a little more detailed? Please also read the manual of Pure ASP Upload 3 - it is described there how to upload images and store their names into a database: www.dmxzone.com/go/12067
Replied 09 Jul 2012 14:00:46
09 Jul 2012 14:00:46 Jacque D replied:
i did follow the tutorial, with the script above i can upload the images to the folder, but it's not inserting data to database "MM_editCmd.CommandText = "INSERT INTO images ( image1) VALUES (?)" MM_editCmd.CommandText = "INSERT INTO images ( image1) VALUES (?)" "
i am using flash uploader
Thanks
i am using flash uploader
Thanks
Replied 10 Jul 2012 06:38:14
10 Jul 2012 06:38:14 Teodor Kuduschiev replied:
All you need to do is to use a standard insert record behavior and apply it after the Pure Asp Upload is inserted on the page.
Replied 10 Jul 2012 13:16:12
10 Jul 2012 13:16:12 Jacque D replied:
that's exactly what i did. If you copy and paste the code above you will see it. BUT it's not inserting to database.
using FLASHUPLOADER. it works fine with pure asp uploader but not with FLASHUPLOADER.
Thanks
using FLASHUPLOADER. it works fine with pure asp uploader but not with FLASHUPLOADER.
Thanks
Replied 10 Jul 2012 13:52:31
10 Jul 2012 13:52:31 Teodor Kuduschiev replied:
Please provide a link to your page where i can test this.
Replied 10 Jul 2012 14:49:19
10 Jul 2012 14:49:19 Jacque D replied:
i am working on localhost, did you have a chance to look at my code. am i missing something. my code can also be tested in your end.
thank you
thank you