Wrox Programmer Forums
| 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 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 January 29th, 2007, 12:44 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default difference

I am writing a Exec Store Procedure statement, step by step.Since Parameters value is differ base on the condition.
My sytax is like:

s="storeprocedure1"
s=s & "@parameter1=0"
s=s & ",@parament2=" & parameter2
.
.
.
but I notice there is another syntex like:
s=s &",@parameter2='" & parameter2"'"

what's the difference between the first 1 and the second.

Thanks in advance for your explanation

 
Old January 29th, 2007, 03:14 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In this example:
s=s & ",@parament2=" & parameter2

Your stored procedure is going to exprect an Integer value and, if you supply a string value, the procedure will fail.

This:
s=s &",@parameter2='" & parameter2"'"

passes in string literals to the procedure.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
 
Old January 29th, 2007, 04:48 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a bunch!!!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between name(*) and name() vikkiefd XSLT 3 March 11th, 2008 06:40 AM
Difference ashu .NET Framework 1.x 1 March 27th, 2007 09:46 AM
Difference between / vs ./ vs ../ arulkumar ASP.NET 2.0 Basics 1 February 21st, 2007 12:19 PM
what's the difference? jdkxxx Oracle 3 October 8th, 2005 12:33 PM
The difference mhergenrader J2EE 1 July 15th, 2005 07:20 AM





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