Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Response.write strsql does not yield desired sql statement

Reply
Thread Tools

Response.write strsql does not yield desired sql statement

 
 
Jack
Guest
Posts: n/a
 
      11-19-2004
Hi,
I am trying to check for the final sql statement before passing it to a
database. I want to build the statement using user input in three text boxes.
However, the sql statement does not give me the right statement. Instead it
gives the following message:
Error Type:
Request object, ASP 0102 (0x80004005)
The function expects a string as input.
/sailors/loginverification1.asp, line 14
CODE:
<%
strSQL = "select PeopleNameFirst, PeopleNameLast, PeopleClubCode from People
where " & _
"PeopleNameFirst ='" & Request.Form(txtFirstName) & "' AND " & _
"PeopleNameLat ='" & Request.Form(txtLastName) & "' AND " & _
"PeopleClubCode ='" & Request.Form(txtPassword) & "'"
Response.Write strSQL
%>
Please note that line 14 is the first statement in above sql. Looking for
any advise on where the problem of the sql is. Thanks.
 
Reply With Quote
 
 
 
 
Jeff Dillon
Guest
Posts: n/a
 
      11-19-2004
Should be Request.Form("txtFirstName")

(in quotes)


"Jack" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Hi,
> I am trying to check for the final sql statement before passing it to a
> database. I want to build the statement using user input in three text

boxes.
> However, the sql statement does not give me the right statement. Instead

it
> gives the following message:
> Error Type:
> Request object, ASP 0102 (0x80004005)
> The function expects a string as input.
> /sailors/loginverification1.asp, line 14
> CODE:
> <%
> strSQL = "select PeopleNameFirst, PeopleNameLast, PeopleClubCode from

People
> where " & _
> "PeopleNameFirst ='" & Request.Form(txtFirstName) & "' AND " & _
> "PeopleNameLat ='" & Request.Form(txtLastName) & "' AND " & _
> "PeopleClubCode ='" & Request.Form(txtPassword) & "'"
> Response.Write strSQL
> %>
> Please note that line 14 is the first statement in above sql. Looking for
> any advise on where the problem of the sql is. Thanks.



 
Reply With Quote
 
 
 
 
Jack
Guest
Posts: n/a
 
      11-19-2004
Thanks for pointing out the mistake. I overlooked it altoghther. Regards.

"Jeff Dillon" wrote:

> Should be Request.Form("txtFirstName")
>
> (in quotes)
>
>
> "Jack" <(E-Mail Removed)> wrote in message
> news(E-Mail Removed)...
> > Hi,
> > I am trying to check for the final sql statement before passing it to a
> > database. I want to build the statement using user input in three text

> boxes.
> > However, the sql statement does not give me the right statement. Instead

> it
> > gives the following message:
> > Error Type:
> > Request object, ASP 0102 (0x80004005)
> > The function expects a string as input.
> > /sailors/loginverification1.asp, line 14
> > CODE:
> > <%
> > strSQL = "select PeopleNameFirst, PeopleNameLast, PeopleClubCode from

> People
> > where " & _
> > "PeopleNameFirst ='" & Request.Form(txtFirstName) & "' AND " & _
> > "PeopleNameLat ='" & Request.Form(txtLastName) & "' AND " & _
> > "PeopleClubCode ='" & Request.Form(txtPassword) & "'"
> > Response.Write strSQL
> > %>
> > Please note that line 14 is the first statement in above sql. Looking for
> > any advise on where the problem of the sql is. Thanks.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] To Yield or Not to Yield: An Inferable Question Michael Edgar Ruby 13 04-21-2011 05:55 PM
yield expression programmized-formal interpretation. (interpretationof yield expression.) castironpi@gmail.com Python 1 04-22-2008 01:32 AM
How do you ... SelectCommand="<%=strSQL%>" googlegroup@desiboy.com ASP .Net 4 01-18-2007 12:37 PM
What does this statement yield? Frank C++ 2 07-29-2005 06:30 AM
Yield & associations (was Proc / def /yield semantics) Markus Ruby 1 09-27-2004 07:04 PM



Advertisments