Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 22nd, 2005, 02:33 PM
Registered User
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with select statement

 I am doing a bookstore application.When a particular language book(eg:java)is selected from the select box the ASP statement should fetch the corresponding results in to the recordset.
bname below is the bookname.
Set rs=conn.Execute("select * from booktab where booknmae like '%<%=bname%>%'")
on executing this asp page the error is shown with the code above.
  Please help me out in this problem
   Thanks in advance...

Old March 22nd, 2005, 05:46 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

What is the error? should it be bookname instead of booknmae? Plus too try:

conn.Execute("select * from booktab where booknmae like '%" & bname & "%'")

Old March 24th, 2005, 02:29 PM
Registered User
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Brian,
  Thanx a lot for ur help.The error was "syntax error in select statement'.I changed the select statement as suggested by you.Now it is working fine.
  Thanx once again

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Bie- Select Statement problem sparsh2010 Access VBA 1 January 22nd, 2008 01:00 PM
Problem with SELECT INTO statement 132591 SQL Language 1 November 27th, 2006 06:58 AM
SQL select statement problem shrisangeeta Classic ASP Databases 3 June 15th, 2006 10:28 AM
Problem with "where = " select statement shirley65 SQL Language 3 October 17th, 2005 04:07 PM
SELECT statement...strange problem abbylee26 Classic ASP Databases 7 March 16th, 2004 02:34 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.