Advertisement

12.24.2007 at 03:16AM PST, ID: 23041339
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

ASP upload - can't get 'filename' without path?

Asked by swordfishsoup in VB Script, Miscellaneous Web Development, Macromedia Dreamweaver

Tags: , , , ,

Hi

I usually use persits upload, but am working with a clients hosting company that uses 'fileup'. I've got it working fine but at the end of the proccess I need to add the 'name' of the file into an access db.

That part is functioning but it is adding the full server path atthe begining of the filename, I just need the name and extension (always .mp3)

Any suggestions please?

Thanks - Happy Christmas



Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
<%
	Set oFileUp = Server.CreateObject("SoftArtisans.FileUp")
 
	'--- Set the Path property to the location you wish to temporarily cache the incoming file before saving
oFileUp.Path = Server.MapPath("../audio/")
 
'--- Check if a file was selected (myFile is coming from the HTML code)
'--- If so, continue processing
If Not oFileUp.Form("myFile").IsEmpty Then
 
'--- Save the file
oFileUp.Form("myFile").Save
 
'--- The file is saved, display a confirmation message
Response.Write ("<B>File saved successfully on the server as:</B><BR>")
 
'--- The ServerName() property is the full path of the file where it was saved on the server
Response.Write(oFileUp.Form("myFile").ServerName)
 
Dim Filename
Filename = oFileUp.Form("myFile")
 
	Dim MM_editCmd
	Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_mtechconn3_STRING
	MM_editCmd.CommandText = "UPDATE tblTracks SET TrackLink = ? WHERE TrackBandID = ?" 
    MM_editCmd.Prepared = true
	MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 255, Filename) ' adVarWChar 
	MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 5, 1, -1, Session("BandID")) ' adDouble
	
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
 
Else
Response.Write("Error: There was no file submitted for upload.")
End If
 
'--- Destroy objects
Set oFileUp = Nothing
[+][-]12.24.2007 at 03:22AM PST, ID: 20524264

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Miscellaneous Web Development, Macromedia Dreamweaver
Tags: filename, get, upload, file, path
Sign Up Now!
Solution Provided By: asvforce
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.24.2007 at 03:35AM PST, ID: 20524291

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 03:37AM PST, ID: 20524297

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 03:49AM PST, ID: 20524320

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 03:51AM PST, ID: 20524325

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 03:58AM PST, ID: 20524336

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:01AM PST, ID: 20524341

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:04AM PST, ID: 20524353

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:10AM PST, ID: 20524364

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:11AM PST, ID: 20524368

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:13AM PST, ID: 20524371

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:15AM PST, ID: 20524376

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:17AM PST, ID: 20524380

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.24.2007 at 04:25AM PST, ID: 20524395

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628