Ask a Question related to Dreamweaver AppDev, Design and Development.
-
orenlevy #1
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
-
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... -
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... -
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... -
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... -
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,... -
CMBergin #2
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...form> Hi
>
> I have an ASP code that works pretty fine, it collects information from afile in> 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 thatDreamweaver it> Dreamweaver, (I?m writing it in notepad) when ever I open it inby.> 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 failsRequest.Form("Email")> (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("Title")> if(Request.Form("FullName") <> "") then WriteToDB__FullName =
> Request.Form("FullName")
> if(Request.Form("Title") <> "") then WriteToDB__Title =Request.Form("Email")> if(Request.Form("Email") <> "") then WriteToDB__Email =Request.Form("Phone")> if(Request.Form("Phone") <> "") then WriteToDB__Phone =Request.Form("City")> 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("State")> if(Request.Form("State") <> "") then WriteToDB__State =Request.Form("HaveYouEverDesignedASICS")> 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 =WriteToDB__IPAddress => if(request.servervariables("REMOTE_HOST") <> "") thencomlumns> 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 /(IPAddress,FullName,Title,Email,Phone,Company,Addr ess,City,State,Zip,Country> set WriteToDB = Server.CreateObject("ADODB.Command")
> WriteToDB.ActiveConnection = MM_semicon2_STRING
> WriteToDB.CommandText = "INSERT INTO PremaRegistration
>
,DoYReplace(WriteToDB__FullName,> ouUseASICS,HaveYouEverDesignedASICS,Comments) VALUES ('" +
> Replace(WriteToDB__IPAddress, "'", "''") + "','" +"'",> "'", "''") + "','" + 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,"&request.form("DoYouUseASICS")&chr(10)> "''")+ "','" + 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:> 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
-
Tom Muck #3
Re: Dreamweaver freezes when opening ASP file
"orenlevy" <webforumsuser@macromedia.com> wrote in message
news:cv3ra3$e5n$1@forums.macromedia.com...form> Hi
>
> I have an ASP code that works pretty fine, it collects information from afile in> 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 thatDreamweaver it> Dreamweaver, (I?m writing it in notepad) when ever I open it inIf this is Dreamweaver 6.0, you need to install the 6.1 updater. If this is> hangs there until I kill the process.
> I can open it without a problem in FrontPage (sorry for that)
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
-
orenlevy #4
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
-
orenlevy #5
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



Reply With Quote

