Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases 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 15th, 2004, 03:25 PM
Authorized User
 
Join Date: Jul 2003
Posts: 41
Thanks: 0
Thanked 1 Time in 1 Post
Default get error when SELECT search starts with "@"

Here's a good one for you.....help if you can.

People come to my order page from two directions...both enters vendor info for them.

If they know a Person/Organizaion ID they enter the number and click the button which sends uiid or fein number they entered. uiid format = 123456789 or @12345678. fein format = 12-3456789

The user can also go to our vendor table and click a vendor which will send the key to the order page.

Problem is my code works great for everything except when they enter a uiid that starts with a @.
Before I gave them a direct link from the vendor table this part worked fine.
The added line to make the vendor lookup link work: " OR key = " & Request.Form("search_string")

my SQL statement:

sSQL = "SELECT * " & _
 " FROM vendor" & _
 " WHERE fein = '" & Request.Form("search_string") & "'" & _
 " OR uiid = '" & Request.Form("search_string") & "'" & _
 " OR key = " & Request.Form("search_string")
Set rs = Connect.Execute(sSQL)

 
Old March 15th, 2004, 03:37 PM
Authorized User
 
Join Date: Jul 2003
Posts: 41
Thanks: 0
Thanked 1 Time in 1 Post
Default

IT's Working...everybody knock on wood.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Select * statement when PC starts up... RinoDM SQL Server 2000 3 May 16th, 2007 12:28 PM
Select Statement Help!!! PLEASE!!! Long Search Jonvan20 Access VBA 7 December 12th, 2006 02:04 PM
column name starts with a number. c# throws error. jaikanth_n ADO.NET 0 March 18th, 2006 01:44 PM
search select control rajanikrishna HTML Code Clinic 2 March 3rd, 2004 11:13 AM
How to search for (and select) a record? Haroldd Access 2 June 30th, 2003 06:50 PM





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