Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
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:31 PM
Registered User
Join Date: Mar 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in select statement in ASP-ACCESS

 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, 04:41 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts

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

It should look something like that. bname should be a variable coming in from a user's interaction with the page.

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

 Thanx for ur help.The error was 'Syntax error in select statement'.I cjanged the select statement as suggested by u.Now it's working fine.
  Thanx once again

Similar Threads
Thread Thread Starter Forum Replies Last Post
SELECT statement in ASP please help jennypretty Classic ASP Basics 15 December 3rd, 2008 01:03 AM
YYYY and MM in access' SQL select statement Condor76 Access VBA 1 February 15th, 2006 02:47 PM
Problem with select statement s.abraham ASP.NET 1.0 and 1.1 Basics 2 March 24th, 2005 02:29 PM
add this select statement to this asp antonyx Classic ASP Databases 2 February 20th, 2005 11:51 AM
ASP sql select statement scorpio Classic ASP Databases 5 July 30th, 2003 06:48 AM

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