Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old November 30th, 2006, 11:22 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

woodyz - Now you mention it, I do remember JS was being used as you suggest in this post. I dont go reading back through posts when trying to be helpful - my appologies for not reading back through.

You use of 'Well...' is a bit off, good day to you...



Wind is your friend
Matt
Reply With Quote
  #22 (permalink)  
Old November 30th, 2006, 11:31 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by mat41
 woodyz - Now you mention it, I do remember JS was being used as you suggest in this post. I dont go reading back through posts when trying to be helpful - my appologies for not reading back through.

You use of 'Well...' is a bit off, good day to you...



Wind is your friend
Matt
I didn't mean offense, that is just the way I talk. You do good work here, and I know you are dedicated and a pro. Sorry if it seemed like I was dissing you.

Woody Z http://www.learntoprogramnow.com
Reply With Quote
  #23 (permalink)  
Old November 30th, 2006, 11:42 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

No problems mate, attention to detail was lacking in my response. Thankyou for your compliment - have a fine day...

Wind is your friend
Matt
Reply With Quote
  #24 (permalink)  
Old December 2nd, 2006, 12:43 PM
Authorized User
 
Join Date: Sep 2006
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you all so much for your help, especially Woody! My program now works - no more error msg!

You guys are gonna have to tutor me about single and double quotes concerning sql statements. I very much have a mental block about that, and the books don't really help much. For example, in my "insert" and "select" statements, there are single quotes next to double quotes and stuff, and I really can't make any sense out of it. It looks too messy to me. Can you enlighten me about that?

Reply With Quote
  #25 (permalink)  
Old December 2nd, 2006, 05:09 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Syster Tara
 Thank you all so much for your help, especially Woody! My program now works - no more error msg!

You guys are gonna have to tutor me about single and double quotes concerning sql statements. I very much have a mental block about that, and the books don't really help much. For example, in my "insert" and "select" statements, there are single quotes next to double quotes and stuff, and I really can't make any sense out of it. It looks too messy to me. Can you enlighten me about that?
Certainly. The single quotes are used by SQL, and the double quotes are used by Javascript. You are building a Sql statement (that uses single quotes) using Javascript (which is using the double quotes).

In Sql, the single quotes are required to delimit a literal string value, and in Javascript the double quotes are used to delimit a literal string value. You are concatenating a string (using the + operator) out of literals (the things in double quotes) and variables. The string you are building happens to have single quotes in it since they are needed by the Sql statement to indicate literals, just like it also has letters and words.

So... what are literals??? A literal is treated differenlty than the rest of your code when processing is done. The string literal is treated merely as the "literal string" that it contians, and it isn't used to provide instructions to the processor - it is something that can be operated on, but isn't itself part of the instructions. Without having some way to indicate that the string is meant to NOT be part of the code itself, all languages use some way to delimit strings. In our case, it is the Single and Double quotes.

So, to say that all over again - the single quotes are needed by the Sql database to be able to do its work, and the double quotes are needed by Javascript to do its work.

Dang. It just seems like I am saying the same thing over and over.
Anyway - I hope that helps a little.

Woody Z http://www.learntoprogramnow.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in SQL syntax phantom3008 ASP.NET 1.0 and 1.1 Basics 1 April 26th, 2007 07:00 AM
Example SQL causes syntax error Tom Rigby BOOK: Beginning SQL 1 April 18th, 2007 09:32 AM
SQL syntax error - Chapter 3 cutthroatchemist BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 January 15th, 2007 06:19 PM
Syntax error on SQL statement Chris1 Access VBA 1 September 7th, 2004 07:47 AM
$sql="CREATE TABLE syntax error cedtech23 Beginning PHP 3 August 24th, 2004 04:56 AM



All times are GMT -4. The time now is 12:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.