Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: compilation error


Message #1 by "Nisha Nambiar" <nishanam@y...> on Thu, 19 Oct 2000 17:50:04 +0100
Hi



I get an error



Microsoft VBScript compilation error '800a03ee' 



Expected ')' 



/begasp/PrintOrder.asp, line 67 



intQuantity = Request.Form ("Q<%=rsItems("ItemName")

------------------------------------------^



This what I am trying to do

I have a Page with a table inside a form

<FORM ACTION="PrintOrder.asp" METHOD=POST>

<TD WIDTH="12%"><INPUT TYPE="Text" NAME="Q<%=rsItems("ItemName")%>" SIZE="5"></TD>

<CENTER><INPUT TYPE="Submit" value="Print Order"></CENTER>



When I hit on Print Order button

A new page loads and in that i have a code



intQuantity = Request.Form ("Q<%=rsItems("ItemName")%>") 'Here the error occur.

I think its some Quotes problem, but can't figure out.

I would appreciate the help.

Thanks

Nisha

Message #2 by "Ken Schaefer" <ken@a...> on Fri, 20 Oct 2000 15:23:50 +1000
on page1 you are doing this:



<INPUT TYPE="Text" NAME="Q<%=rsItems("ItemName")%>" SIZE="5">



If rsItems("ItemName") = "foo" then what you are actually writing to the

screen is this:



<input type="text" name="Qfoo" size="5">



on page2.asp you can get this value by doing this:



intQuantity = Request.Form("Qfoo")



alternatively, if you don't know that rsItems("ItemName") contains "foo" you

will have to requery the database to get the value of rsItems("ItemName")...



intQuantity = Request.Form("Q" & rsItems("ItemName"))



You can't do what you're doing at the moment, because you are trying to

execute ASP code inside ASP code, and that wont work.



Cheers

Ken





----- Original Message -----

From: "Nisha Nambiar" <nishanam@y...>

To: "ASP Databases" <asp_databases@p...>

Sent: Friday, October 20, 2000 2:50 AM

Subject: [asp_databases] compilation error





> Hi

>

> I get an error

>

> Microsoft VBScript compilation error '800a03ee'

>

> Expected ')'

>

> /begasp/PrintOrder.asp, line 67

>

> intQuantity = Request.Form ("Q<%=rsItems("ItemName")

> ------------------------------------------^

>

> This what I am trying to do

> I have a Page with a table inside a form

> <FORM ACTION="PrintOrder.asp" METHOD=POST>

> <TD WIDTH="12%"><INPUT TYPE="Text" NAME="Q<%=rsItems("ItemName")%>"

SIZE="5"></TD>

> <CENTER><INPUT TYPE="Submit" value="Print Order"></CENTER>

>

> When I hit on Print Order button

> A new page loads and in that i have a code

>

> intQuantity = Request.Form ("Q<%=rsItems("ItemName")%>") 'Here the error

occur.

> I think its some Quotes problem, but can't figure out.

> I would appreciate the help.

> Thanks

> Nisha

>

> 
Message #3 by Nisha Nambiar <nishanam@y...> on Fri, 20 Oct 2000 09:25:14 -0700 (PDT)
Ken

 You are absolutely right. Well I got this problem

solved by one of collegues. He also said the same

thing 7 it worked.

I really appreciate the help & reply, looking forward

for some more help from you later.

Thanks

Nisha

--- Ken Schaefer <ken@a...> wrote:

> on page1 you are doing this:

> 

> <INPUT TYPE="Text" NAME="Q<%=rsItems("ItemName")%>"

> SIZE="5">

> 

> If rsItems("ItemName") = "foo" then what you are

> actually writing to the

> screen is this:

> 

> <input type="text" name="Qfoo" size="5">

> 

> on page2.asp you can get this value by doing this:

> 

> intQuantity = Request.Form("Qfoo")

> 

> alternatively, if you don't know that

> rsItems("ItemName") contains "foo" you

> will have to requery the database to get the value

> of rsItems("ItemName")...

> 

> intQuantity = Request.Form("Q" &

> rsItems("ItemName"))

> 

> You can't do what you're doing at the moment,

> because you are trying to

> execute ASP code inside ASP code, and that wont

> work.

> 

> Cheers

> Ken

> 

> 

> ----- Original Message -----

> From: "Nisha Nambiar" <nishanam@y...>

> To: "ASP Databases" <asp_databases@p...>

> Sent: Friday, October 20, 2000 2:50 AM

> Subject: [asp_databases] compilation error

> 

> 

> > Hi

> >

> > I get an error

> >

> > Microsoft VBScript compilation error '800a03ee'

> >

> > Expected ')'

> >

> > /begasp/PrintOrder.asp, line 67

> >

> > intQuantity = Request.Form

> ("Q<%=rsItems("ItemName")

> > ------------------------------------------^

> >

> > This what I am trying to do

> > I have a Page with a table inside a form

> > <FORM ACTION="PrintOrder.asp" METHOD=POST>

> > <TD WIDTH="12%"><INPUT TYPE="Text"

> NAME="Q<%=rsItems("ItemName")%>"

> SIZE="5"></TD>

> > <CENTER><INPUT TYPE="Submit" value="Print

> Order"></CENTER>

> >

> > When I hit on Print Order button

> > A new page loads and in that i have a code

> >

> > intQuantity = Request.Form

> ("Q<%=rsItems("ItemName")%>") 'Here the error

> occur.

> > I think its some Quotes problem, but can't figure

> out.

> > I would appreciate the help.

> > Thanks

> > Nisha

> >

> > 


  Return to Index