Guys, please help me out with this one ...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Guys, please help me out with this one ...

  1. #1
    Join Date
    Aug 2007
    Posts
    5

    Wink Guys, please help me out with this one ...

    I'm desperately trying to use Forms on my website. I have no problems with gathering information I do that in regular HTML code. I then process the information I get with ASP code. Now this turned out to be a ***** (excuse my French):

    When setting up my own IIS server for testing purposes, the ASP code worked just fine. I then wanted to upload the site on a web server that my ISP provided me with. He said that I need to use the Db directory in order for it to work properly (I know all directories arent meant to execute this type of work). Ok, so I programmed my ASP code to write the information to a text file in the Db directory.

    After running the code, all I got was a server information, that an error accrued and that I need to inform my ISP (administrator). So I did. Yeah .. that did me some good. All he did was checked the privileges of my Db directory and said that its the way it should be.

    So now Im back at the beginning the code works on my IIS (my computer) but doesnt work on the real server. WHAT AM I DOING WRONG?

    Here is the ASP code (a very basic one) that I want to use on my website:

    <%
    dim strFileName
    strFileName = "Db/Ponudbe.txt"
    dim objFileFSO
    set objFileFSO = createObject ("Scripting.FileSystemObject")
    dim objFileTS
    if objFileFSO.FileExists(strFileName) then
    set objFileTS = objFileFSO.OpenTextFile(strFileName,8)
    else
    set objFileTS = objFileFSO.CreateTextFile(strFileName)
    end if
    dim strEntry
    strEntry = "----------------------------------------------------------------------------------------------------------------------" & vbcrlf _
    & "ZAHTEVEK ZA PONUDBO" & vbcrlf & "Zapis nastal: " & FormatDateTime (Now) & vbcrlf
    strEntry = strEntry & "Naziv podjetja: " & request.form("NazivPodjetja") & vbcrlf
    strEntry = strEntry & "Naslov podjetja: " & request.form("Naslov") & vbcrlf
    strEntry = strEntry & "Postna stevilka in posta: " & request.form("PostnaStevilka") & vbcrlf
    strEntry = strEntry & "Priimek odgovorne osebe: " & request.form("Priimek") & vbcrlf
    strEntry = strEntry & "Ime odgovorne osebe: " & request.form("Ime") & vbcrlf
    strEntry = strEntry & "Se ukvarjamo z izobrazevalno dejavnostjo: " & request.form("Opcija3") & vbcrlf
    strEntry = strEntry & "Naslov elektrosnke poste: " & request.form("Eposta") & vbcrlf
    strEntry = strEntry & "Identifikacijska st. za DDV: " & request.form("IDDDV") & vbcrlf
    strEntry = strEntry & "Telefonska st. oz. GSM st.: " & request.form("TelefonGSM") & vbcrlf
    strEntry = strEntry & "Stevilka faksa: " & request.form("Faks") & vbcrlf
    strEntry = strEntry & "Narocena aplikacija / storitev - opcija: " & request.form("Zanimanje") & vbcrlf
    strEntry = strEntry & "Kolicina: " & request.form("Kolicina") & vbcrlf
    objFileTS.WriteLine strEntry
    'Zapiranje datoteke ...
    objFileTS.close
    %>

    Oh, .. please forgive my english - it's a bit rusty. I promise to work on it the moment I solve the mentioned mistery

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If the code works on your development PC, then the problem is on the server. You'll have to work with your ISP to troubleshoot and correct it. The first step is to determine the specific error and on which line it occurs.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Aug 2007
    Posts
    5
    Thank you, Phil.

    That's all I wanted to hear. I thought so myself. I'll try to reson with them - keep your fingers crossed

    Great forum - must say. I'd really appreciate it if you / someone could tryout the code just to confirm it works properly. Would that be possible?

    Thank you a million in advance!

    Best regards,
    The-Kid

  4. #4
    Join Date
    Aug 2007
    Posts
    5
    Ok. So now I've managed to locate the line in question: it's the one explaining the PATH:

    strFileName = "Db/Ponudbe.txt"

    The server prompts:

    Microsoft VBScript runtime error '800a004c'
    Path not found


    But I know that a directory with that name (Db) exists! Any ideas?

    Thanks in advance!

  5. #5
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You might try using Server.MapPath: http://www.4guysfromrolla.com/webtech/121799-1.shtml
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  6. #6
    Join Date
    Aug 2007
    Posts
    5
    Phil,

    That sounds pretty promising thanks. Ill go and check it out. Thank you once again. Ill let you know about the outcome

    Best regards,
    Andrew

  7. #7
    Join Date
    Aug 2007
    Posts
    5
    Yeah! It's amazing! The SERVER.MAPPATH rools! I found the right path now and everything works just great! Thank you once again, Phil. C ya!

Similar Threads

  1. Replies: 3
    Last Post: 05-03-2006, 01:32 PM
  2. help needed on cipher string guys
    By pouncer in forum C++
    Replies: 0
    Last Post: 02-12-2006, 06:21 PM
  3. Guys can you help me out with the VB coding
    By BAW264 in forum VB Classic
    Replies: 3
    Last Post: 05-09-2005, 10:20 PM
  4. Thanks guys!!
    By Felix Haas in forum VB Classic
    Replies: 0
    Last Post: 05-04-2001, 05:50 PM
  5. Thanks guys!!
    By Felix Haas in forum VB Classic
    Replies: 0
    Last Post: 05-04-2001, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center