Akasha Posted February 21, 2006 Share Posted February 21, 2006 hello after some research on the internet i came to the conclusing that you cannot use request.from and uploading a filebecause you get this error:Cannot use the generic Request collection after calling BinaryRead. the gave several solutions like use Upload.form or FormUploadRequest instead of request.form I have tried it but it still won't work :)I use the code from FreeASPUploadit would be nice is i could use variables from my page and use the file uploador else i have to split te form in 2 parts :)does anyone has a solution??greetings Leandra Link to comment Share on other sites More sharing options...
netcracker Posted February 21, 2006 Share Posted February 21, 2006 I myself chose an "inovative and original" 2 page solution. After the data is inserted redirect the user to the upload form or present him with the upload form just after the success message for the insertion of data. Link to comment Share on other sites More sharing options...
Akasha Posted February 22, 2006 Author Share Posted February 22, 2006 Can't i include the upload page into my normal form or something Link to comment Share on other sites More sharing options...
netcracker Posted February 22, 2006 Share Posted February 22, 2006 if u can find a way to insert/update the info in your DB and at the same time upload your files...I needed to upload accordig to an "id" field so first i needed to do the data insertion/update an d afterwards do the upload by taking the ID of the data previusly inserted/updated.hope i've been coherent... Link to comment Share on other sites More sharing options...
pulpfiction Posted February 22, 2006 Share Posted February 22, 2006 I actually didnt go througt the article completely, got it in google, but the heading sounded little related so give it a try. http://support.microsoft.com/default.aspx?...kb;en-us;288328 Link to comment Share on other sites More sharing options...
Akasha Posted February 23, 2006 Author Share Posted February 23, 2006 hmz.. frontpage add-on or something :-s Link to comment Share on other sites More sharing options...
Akasha Posted February 23, 2006 Author Share Posted February 23, 2006 FINALLY..... IT WORKS i found out how it works pffiieeeuuuwww!!!!hahaha i' am starting to become a real programmer i looked at the documentation of AspUpload and found out you can indeed use Upload.form to retrieve data from a form.But when i used it i got this error Microsoft VBScript runtime error '800a01a8' Object required: '' i found out that the page was trying to use an object that wasn't created yet.i only gets created after the submitso i first had to check if a submit was donedid it with the line: if Request.ServerVariables("REQUEST_METHOD") = "POST" then so got the variables out of the form and send it to the databasework absoluty fine and my file was also uploadedthe only i needed to do now was to send te filename to the databasetherefore i used this code dim Upload, fileName Set Upload = New FileUpload Upload.Save(uploadsDirVar) for each fileKey in Upload.UploadedFiles.keys SaveFiles = Upload.UploadedFiles(fileKey).FileName next and used the SaveFiles in my queryand now it all works Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now