Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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 April 13th, 2006, 10:56 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default String Problem

The following code returns

Code
*******
sql="SELECT * FROM CUSTOMERS " &_
    "WHERE CUSTOMERID ="
sql=sql & request.querystring("q")

Returns
*************
SELECT * FROM CUSTOMERS WHERE CUSTOMERID =NORTS
Microsoft JET Database Engine error '80040e10'
No value given for one or more required parameters.

I need it to return
SELECT * FROM CUSTOMERS WHERE CUSTOMERID ='NORTS'

It is missing the extra single quotes

 
Old April 13th, 2006, 11:11 AM
Registered User
 
Join Date: Apr 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code should read

sql="SELECT * FROM CUSTOMERS " &_
    "WHERE CUSTOMERID ='"
'sql="SELECT * FROM CUSTOMERS WHERE CUSTOMERID="
sql=sql & request.querystring("q") &"'"






Similar Threads
Thread Thread Starter Forum Replies Last Post
Query string problem sathish_reddy ASP.NET 2.0 Basics 0 February 23rd, 2007 08:18 AM
String Problem muki XSLT 0 October 12th, 2005 10:19 PM
string problem shoakat Classic ASP Databases 3 October 20th, 2004 08:53 AM
Problem with the connection string?? budman Access ASP 2 March 29th, 2004 07:12 AM
connection string problem mateenmohd SQL Server 2000 2 September 3rd, 2003 01:41 PM





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