Dreamweaver freezes when opening ASP file

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Dreamweaver freezes when opening ASP file

    Hi

    I have an ASP code that works pretty fine, it collects information from a form
    and then writes it to a database and also emails it.
    It does it ok without a problem but for Some reason I can?t open that file in
    Dreamweaver, (I?m writing it in notepad) when ever I open it in Dreamweaver it
    hangs there until I kill the process.
    I can open it without a problem in FrontPage (sorry for that)

    I narrowed it down to a specific line in the code that Dreamweaver fails by.
    (line 25 in the code)

    set WriteToDB = Server.CreateObject("ADODB.Command")

    Besides not being able to
    Any idea why?

    Thank you

    Oren


    <!--#include file="../Connections/semicon2.asp" -->
    <%
    ' bring information from the form and enter into veriables
    if(Request.Form("Email") <> "") then WriteToDB__email = Request.Form("Email")
    if(Request.Form("FullName") <> "") then WriteToDB__FullName =
    Request.Form("FullName")
    if(Request.Form("Title") <> "") then WriteToDB__Title = Request.Form("Title")
    if(Request.Form("Email") <> "") then WriteToDB__Email = Request.Form("Email")
    if(Request.Form("Phone") <> "") then WriteToDB__Phone = Request.Form("Phone")
    if(Request.Form("Company") <> "") then WriteToDB__Company =
    Request.Form("Company")
    if(Request.Form("Address") <> "") then WriteToDB__Address =
    Request.Form("Address")
    if(Request.Form("City") <> "") then WriteToDB__City = Request.Form("City")
    if(Request.Form("State") <> "") then WriteToDB__State = Request.Form("State")
    if(Request.Form("Zip") <> "") then WriteToDB__Zip = Request.Form("Zip")
    if(Request.Form("Country") <> "") then WriteToDB__Country =
    Request.Form("Country")
    if(Request.Form("DoYouUseASICS") <> "") then WriteToDB__DoYouUseASICS =
    Request.Form("DoYouUseASICS")
    if(Request.Form("HaveYouEverDesignedASICS") <> "") then
    WriteToDB__HaveYouEverDesignedASICS = Request.Form("HaveYouEverDesignedASICS")
    if(request.servervariables("REMOTE_HOST") <> "") then WriteToDB__IPAddress =
    request.servervariables("REMOTE_HOST")
    if(Request.Form("Comments") <> "") then WriteToDB__Comments =
    Request.Form("Comments")

    %>
    <%
    ' open a connection to a Database and enter veriables into tables / comlumns
    set WriteToDB = Server.CreateObject("ADODB.Command")
    WriteToDB.ActiveConnection = MM_semicon2_STRING
    WriteToDB.CommandText = "INSERT INTO PremaRegistration
    (IPAddress,FullName,Title,Email,Phone,Company,Addr ess,City,State,Zip,Country,DoY
    ouUseASICS,HaveYouEverDesignedASICS,Comments) VALUES ('" +
    Replace(WriteToDB__IPAddress, "'", "''") + "','" + Replace(WriteToDB__FullName,
    "'", "''") + "','" + Replace(WriteToDB__Title, "'", "''")+ "','" +
    Replace(WriteToDB__Email, "'", "''")+ "','" + Replace(WriteToDB__Phone, "'",
    "''")+ "','" + Replace(WriteToDB__Company, "'", "''")+ "','" +
    Replace(WriteToDB__Address, "'", "''")+ "','" + Replace(WriteToDB__City, "'",
    "''")+ "','" + Replace(WriteToDB__State, "'", "''")+ "','" +
    Replace(WriteToDB__Zip, "'", "''")+ "','" + Replace(WriteToDB__Country, "'",
    "''")+ "','" + Replace(WriteToDB__DoYouUseASICS, "'", "''")+ "','" +
    Replace(WriteToDB__HaveYouEverDesignedASICS, "'", "''")+ "','" +
    Replace(WriteToDB__Comments, "'", "''")+ "') "
    WriteToDB.CommandType = 1
    WriteToDB.CommandTimeout = 0
    WriteToDB.Prepared = true
    WriteToDB.Execute()


    %>
    <%
    ' Defining veriables
    Dim objMail
    dim person
    dim domain
    person = "orenl"
    domain = "zaharoni.com"

    ' Setting CDONTS object
    Set objMail = Server.CreateObject("CDONTS.NewMail")


    'these are the variables
    ' from verialbe = email address of the form.
    FromVar = Request.Form("Email")
    'to email address
    ToVar = person&"@"&domain
    'subject of email
    SubjectVar = "Prema Registration"

    'Body of the email information

    BodyVar = BodyVar&"Full Name: "&request.form("FullName")&chr(10)
    BodyVar = BodyVar&"Title: "&request.form("Title")&chr(10)
    BodyVar = BodyVar&"Email: "&request.form("Email")&chr(10)
    BodyVar = BodyVar&"Phone: "&request.form("Phone")&chr(10)
    BodyVar = BodyVar&"Company: "&request.form("Company")&chr(10)
    BodyVar = BodyVar&"Address: "&request.form("Address")&chr(10)
    BodyVar = BodyVar&"City: "&request.form("City")&chr(10)
    BodyVar = BodyVar&"State: "&request.form("State")&chr(10)
    BodyVar = BodyVar&"Zip: "&request.form("Zip")&chr(10)
    BodyVar = BodyVar&"Country: "&request.form("Country")&chr(10)
    BodyVar = BodyVar&"Do You Use ASICS: "&request.form("DoYouUseASICS")&chr(10)
    BodyVar = BodyVar&"Full Name: "&request.form("FullName")&chr(10)
    BodyVar = BodyVar&"Have You Ever Designed ASICS:
    "&request.form("HaveYouEverDesignedASICS")&chr (10)



    'pass veriables to CDONTS server object
    objMail.From = FromVar
    objMail.Subject = SubjectVar
    objMail.To = ToVar
    objMail.Body = BodyVar
    objMail.Send

    'clear CDONTS information
    set objMail = nothing

    'Redirect to a page
    response.redirect "/Pages/Community/Thanksemail.htm"
    %>

    orenlevy Guest

  2. Similar Questions and Discussions

    1. IE 6 randomly freezes when opening a PDF with Reader 6
      Versions: Windows XP Pro and Win 2000, Internet Explorer 6.0.2800.1106, and Adobe Reader 6.0... Reader Preference: Internet / Display PDF In...
    2. Dreamweaver Exits When opening/saving a file
      When I try to open a file from a site, dreamweaver just completly exits all of a sudden. This only happens when I try to open certain files from...
    3. Dreamweaver Not Responding when opening file
      Product version: Dreamweaver MX 6.1 using Windows Xp Platform Information: 256 MB of RAM 1.99 GHz Pentium 4 CPU 2.00 GHz When opening a regular...
    4. Editing template freezes Dreamweaver
      Hi, I bought Dreamweaver 4 specifically in order to use the template feature. I created a template and some child pages but then every time I...
    5. Elements 1 Opens, but Freezes When Opening a Pic
      I recently upgraded from win98 to XP. Elements 1.0 will open and everything works normally (Help, Prefs, etc.) until I try to open an image file,...
  3. #2

    Default Re: Dreamweaver freezes when opening ASP file

    Dreamweaver shouldn't hang at all, even if your page was an absolute mess
    (it's not, I'm just saying). It doesn't try to execute the server-side
    code, though it does try to identify code blocks it uses for its server
    behaviors. Again, I've never had a problem with that, even on very large
    ASP files.

    1. Is it only this page, or do other ASP pages have a similar problem?
    2. How can you tell that DW is failing on a specific line of code? Do you
    get partial results, or is there an error message?
    3. What extensions do you have installed?
    4. Have you written or installed and custom server behaviors? It may be
    having trouble looking for those behaviors' code blocks.


    "orenlevy" <webforumsuser@macromedia.com> wrote in message
    news:cv3ra3$e5n$1@forums.macromedia.com...
    > Hi
    >
    > I have an ASP code that works pretty fine, it collects information from a
    form
    > and then writes it to a database and also emails it.
    > It does it ok without a problem but for Some reason I can?t open that
    file in
    > Dreamweaver, (I?m writing it in notepad) when ever I open it in
    Dreamweaver it
    > hangs there until I kill the process.
    > I can open it without a problem in FrontPage (sorry for that)
    >
    > I narrowed it down to a specific line in the code that Dreamweaver fails
    by.
    > (line 25 in the code)
    >
    > set WriteToDB = Server.CreateObject("ADODB.Command")
    >
    > Besides not being able to
    > Any idea why?
    >
    > Thank you
    >
    > Oren
    >
    >
    > <!--#include file="../Connections/semicon2.asp" -->
    > <%
    > ' bring information from the form and enter into veriables
    > if(Request.Form("Email") <> "") then WriteToDB__email =
    Request.Form("Email")
    > if(Request.Form("FullName") <> "") then WriteToDB__FullName =
    > Request.Form("FullName")
    > if(Request.Form("Title") <> "") then WriteToDB__Title =
    Request.Form("Title")
    > if(Request.Form("Email") <> "") then WriteToDB__Email =
    Request.Form("Email")
    > if(Request.Form("Phone") <> "") then WriteToDB__Phone =
    Request.Form("Phone")
    > if(Request.Form("Company") <> "") then WriteToDB__Company =
    > Request.Form("Company")
    > if(Request.Form("Address") <> "") then WriteToDB__Address =
    > Request.Form("Address")
    > if(Request.Form("City") <> "") then WriteToDB__City =
    Request.Form("City")
    > if(Request.Form("State") <> "") then WriteToDB__State =
    Request.Form("State")
    > if(Request.Form("Zip") <> "") then WriteToDB__Zip = Request.Form("Zip")
    > if(Request.Form("Country") <> "") then WriteToDB__Country =
    > Request.Form("Country")
    > if(Request.Form("DoYouUseASICS") <> "") then WriteToDB__DoYouUseASICS =
    > Request.Form("DoYouUseASICS")
    > if(Request.Form("HaveYouEverDesignedASICS") <> "") then
    > WriteToDB__HaveYouEverDesignedASICS =
    Request.Form("HaveYouEverDesignedASICS")
    > if(request.servervariables("REMOTE_HOST") <> "") then
    WriteToDB__IPAddress =
    > request.servervariables("REMOTE_HOST")
    > if(Request.Form("Comments") <> "") then WriteToDB__Comments =
    > Request.Form("Comments")
    >
    > %>
    > <%
    > ' open a connection to a Database and enter veriables into tables /
    comlumns
    > set WriteToDB = Server.CreateObject("ADODB.Command")
    > WriteToDB.ActiveConnection = MM_semicon2_STRING
    > WriteToDB.CommandText = "INSERT INTO PremaRegistration
    >
    (IPAddress,FullName,Title,Email,Phone,Company,Addr ess,City,State,Zip,Country
    ,DoY
    > ouUseASICS,HaveYouEverDesignedASICS,Comments) VALUES ('" +
    > Replace(WriteToDB__IPAddress, "'", "''") + "','" +
    Replace(WriteToDB__FullName,
    > "'", "''") + "','" + Replace(WriteToDB__Title, "'", "''")+ "','" +
    > Replace(WriteToDB__Email, "'", "''")+ "','" + Replace(WriteToDB__Phone,
    "'",
    > "''")+ "','" + Replace(WriteToDB__Company, "'", "''")+ "','" +
    > Replace(WriteToDB__Address, "'", "''")+ "','" + Replace(WriteToDB__City,
    "'",
    > "''")+ "','" + Replace(WriteToDB__State, "'", "''")+ "','" +
    > Replace(WriteToDB__Zip, "'", "''")+ "','" + Replace(WriteToDB__Country,
    "'",
    > "''")+ "','" + Replace(WriteToDB__DoYouUseASICS, "'", "''")+ "','" +
    > Replace(WriteToDB__HaveYouEverDesignedASICS, "'", "''")+ "','" +
    > Replace(WriteToDB__Comments, "'", "''")+ "') "
    > WriteToDB.CommandType = 1
    > WriteToDB.CommandTimeout = 0
    > WriteToDB.Prepared = true
    > WriteToDB.Execute()
    >
    >
    > %>
    > <%
    > ' Defining veriables
    > Dim objMail
    > dim person
    > dim domain
    > person = "orenl"
    > domain = "zaharoni.com"
    >
    > ' Setting CDONTS object
    > Set objMail = Server.CreateObject("CDONTS.NewMail")
    >
    >
    > 'these are the variables
    > ' from verialbe = email address of the form.
    > FromVar = Request.Form("Email")
    > 'to email address
    > ToVar = person&"@"&domain
    > 'subject of email
    > SubjectVar = "Prema Registration"
    >
    > 'Body of the email information
    >
    > BodyVar = BodyVar&"Full Name: "&request.form("FullName")&chr(10)
    > BodyVar = BodyVar&"Title: "&request.form("Title")&chr(10)
    > BodyVar = BodyVar&"Email: "&request.form("Email")&chr(10)
    > BodyVar = BodyVar&"Phone: "&request.form("Phone")&chr(10)
    > BodyVar = BodyVar&"Company: "&request.form("Company")&chr(10)
    > BodyVar = BodyVar&"Address: "&request.form("Address")&chr(10)
    > BodyVar = BodyVar&"City: "&request.form("City")&chr(10)
    > BodyVar = BodyVar&"State: "&request.form("State")&chr(10)
    > BodyVar = BodyVar&"Zip: "&request.form("Zip")&chr(10)
    > BodyVar = BodyVar&"Country: "&request.form("Country")&chr(10)
    > BodyVar = BodyVar&"Do You Use ASICS:
    "&request.form("DoYouUseASICS")&chr(10)
    > BodyVar = BodyVar&"Full Name: "&request.form("FullName")&chr(10)
    > BodyVar = BodyVar&"Have You Ever Designed ASICS:
    > "&request.form("HaveYouEverDesignedASICS")&chr (10)
    >
    >
    >
    > 'pass veriables to CDONTS server object
    > objMail.From = FromVar
    > objMail.Subject = SubjectVar
    > objMail.To = ToVar
    > objMail.Body = BodyVar
    > objMail.Send
    >
    > 'clear CDONTS information
    > set objMail = nothing
    >
    > 'Redirect to a page
    > response.redirect "/Pages/Community/Thanksemail.htm"
    > %>
    >

    CMBergin Guest

  4. #3

    Default Re: Dreamweaver freezes when opening ASP file


    "orenlevy" <webforumsuser@macromedia.com> wrote in message
    news:cv3ra3$e5n$1@forums.macromedia.com...
    > Hi
    >
    > I have an ASP code that works pretty fine, it collects information from a
    form
    > and then writes it to a database and also emails it.
    > It does it ok without a problem but for Some reason I can?t open that
    file in
    > Dreamweaver, (I?m writing it in notepad) when ever I open it in
    Dreamweaver it
    > hangs there until I kill the process.
    > I can open it without a problem in FrontPage (sorry for that)
    If this is Dreamweaver 6.0, you need to install the 6.1 updater. If this is
    7.0, you need to install the 7.0.1 updater. There are freezing problems with
    the original releases.


    --
    -------------------------------------------
    Tom Muck
    co-author Dreamweaver MX 2004: The Complete Reference
    [url]http://www.tom-muck.com/[/url]

    Extending Knowledge, Daily
    [url]http://www.CommunityMX.com/[/url]


    Tom Muck Guest

  5. #4

    Default Re: Dreamweaver freezes when opening ASP file

    Hi CMBergin and Tom
    Thank you both for the reply
    I know it's that line cause If I put an apostrophe before it ' (to mark is a
    comment in ASP) I'm able to open the file without a problem.
    once I remove it and save the file from within Dreamweaver it hangs again.
    I have some simmilar ASP pages (other forms for different locations on the
    site) that hangs with the same problem.
    Other ASP pages that uses Dreamweaver built-in code in order to write to a
    Database seems to be working fine.
    I don't have any extensions installed.
    I'm using built-in to Dreamweaver server behaviors.
    The only thing I installed is the SP2 patch (Dreamweaver MX 2004 7.01) but
    that was already after I started having the problem.
    I also checked it in another 2 workstations (both XP with Dreamweaver MX 2004
    7.01)
    Any Idea how to diable the identification of server blocks?

    Thank you

    Oren

    orenlevy Guest

  6. #5

    Default Re: Dreamweaver freezes when opening ASP file

    Somthing very Something very strange
    Dreamweaver doesn?t freeze if I use the built in insert command from the
    server behaviors.
    Looks like it remembers somewhere that I used the same variable name
    WriteToDB on a different ASP page and probably getting stuck on it.
    I think I?ll just use that insert option instead of writing my own code.
    Thank you for the responses

    Oren


    orenlevy Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139