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 April 11th, 2005, 10:51 AM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Converting blank spaces to write a table name.

The question is :

I need to name a table using a simple form that sends info to an asp code. If the name I enter is one single word (ex. "TABLENAME") with no blank spaces there are no problems. If the name I enter in my form is made of more than a word (ex. "TABLE NAME") the asp doesn't work. I was thinking about let the asp code convert blank spaces into "%" when inserting the name and then when displaying info about the table remove the "%". Is it possible ?? How can it be done ?
Thanks a lot !

Ske
 
Old April 11th, 2005, 12:15 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Are you using SQL Server?

If the user enters a blank append "[]" to the table name

Ex:

entered Table Name
send [Table Name]

 
Old April 12th, 2005, 08:55 AM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah !!!!! It works great !!! Thanks a lot !

 
Old April 12th, 2005, 01:32 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Glad I could help!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Blank Spaces in Phone Numbers Brendan Bartley Access 1 April 12th, 2007 11:42 AM
Printing leading and trailing blank spaces chakravarthy_vr Reporting Services 0 May 5th, 2006 01:06 AM
Crystal Reports, to occupy blank spaces singaravel Crystal Reports 1 September 22nd, 2004 02:13 AM
ASP Table write out aware Classic ASP Basics 2 September 18th, 2003 02:03 AM





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