By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,688 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,688 IT Pros & Developers. It's quick & easy.

Response.write strsql does not yield desired sql statement

P: n/a
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.
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Should be Request.Form("txtFirstName")

(in quotes)
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
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.

Jul 22 '05 #2

P: n/a
Thanks for pointing out the mistake. I overlooked it altoghther. Regards.

"Jeff Dillon" wrote:
Should be Request.Form("txtFirstName")

(in quotes)
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:DF**********************************@microsof t.com...
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.


Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.