Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 31st, 2013, 02:06 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default

my first problem is done!! :D and I`m proud that I made it myself at last!!

I use the following code in the loop "for each"

Code:
    if filekey = "attach1" then
            xray = Upload.UploadedFiles("attach1").FileName
            else
            bloodtests = Upload.UploadedFiles("attach2").FileName
            end if
Now I only have the problem on creating subfolders because the upload.form("name") is null and I don`t know why.
 
Old January 2nd, 2014, 12:34 PM
Friend of Wrox
 
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default

once again I did it with a not such a clever way...

Since the Upload.Form("...") values works after the upload.save function I made the following steps in order to solve my problem.
1. I upload the files on the default folder.
2. then I create the folrder using the Upload.Form("name")
3. I reupload the files on the new folder I created on step2
4. I delete the files on the default folder.

I know it`s not proffesional but it works!
 
Old January 2nd, 2014, 05:35 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

I don't know if you noticed but here you have "patname" and not "pathname". Maybe that's why that wasn't working.

You should be able to assign the folder name/path before the save ... somewhere and not have to reupload the file.

What's an example of the value you are looking for in Upload.Form("name")?

newdir = "C:\guestbook_example\UploadedFiles\" & patname & "" set filesys=CreateObject("Scripting.FileSystemObject") if not filesys.FolderExists(newdir) then filesys.CreateFolder (newdir) end if
 
Old January 3rd, 2014, 09:22 PM
Registered User
 
Join Date: Jan 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hello

I am new to programming. I just bought my first book on Java 7.0. I realize I am probably in the wrong place. Just looking for beginner info to help me clarify what I am reading. Maybe someone could point me in the right direction where I should try this on this site?
Thanks
 
Old January 4th, 2014, 10:23 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello friend!

Indeed you are in the wrong place since you are intrested in Java.

I don`t fully understand what you want to do. Do you want some help with a script? or are you looking for the forum section that you can post your questions about Java?
 
Old January 4th, 2014, 10:27 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
although I`m a real newbie! :)
Is there a reason why you're learning classic ASP then? it's dated technology, and its successor ASP.NET makes these kind of tasks a lot simpler.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 5th, 2014, 11:30 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by rstelma View Post
I don't know if you noticed but here you have "patname" and not "pathname". Maybe that's why that wasn't working.

You should be able to assign the folder name/path before the save ... somewhere and not have to reupload the file.

What's an example of the value you are looking for in Upload.Form("name")?

newdir = "C:\guestbook_example\UploadedFiles\" & patname & "" set filesys=CreateObject("Scripting.FileSystemObject") if not filesys.FolderExists(newdir) then filesys.CreateFolder (newdir) end if

You are right about the "patname". I have noticed that. And still not working. You are right about the upload/reupload but I`m not able to find the solution with the "right way". So I`m going to stay with the way I find out cause I have to move on... Thank you for all your help!
 
Old January 6th, 2014, 10:36 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Imar had a good suggestion in learning ASP.NET. I understand why maybe you wanted to get started in classic since its scripted and you can just follow it line by line.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add file upload control in feedback form? asp.net123 Intro Programming 0 August 18th, 2011 03:36 AM
How to add file upload facilty in feedback form ? Ranveer@2468 BOOK: Beginning ASP.NET 4 : in C# and VB 1 August 17th, 2011 02:22 AM
Validate File Format of File Upload to Database Not Working in Codefile in C#... dmacklin2010 BOOK: Beginning ASP.NET 2.0 and Databases 0 July 25th, 2011 12:24 PM
upload file in server ( in folder NOT in database) virtual_manu Pro JSP 2 February 20th, 2006 08:39 AM
Upload a file to sql server database thas123 ASP.NET 1.0 and 1.1 Professional 3 January 9th, 2006 12:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.