Sunteți pe pagina 1din 15

Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

(http://domain.com/PlanetSourceCode/default.asp)

Code: (http://domain.com/vb/scripts/BrowseAllCategories.asp?lngWId=5) 84,225. lines


Jobs: (http://domain.com/vb/jobs/SearchJobs.asp?lngWId=5) 254. postings

SQL Stats:

How to support the site (http://domain.com/vb/donations/default.asp)

Sponsored (http://domain.com/vb/advertisement/scripts/rates.asp?lngWId=5) by:

(http://domain.com/URLSEO/entrancegeneric/ShowWorldSeOnly!asp/lngWId!5/anyname.htm) (http://domain.com/URLSEO/vb/discussion/AskAProMain!asp/blnURLSEO!true/lngWId

.Net (VB and C#) (http://domain.com/vb/default.asp?lngWId=10)


PHP (http://domain.com/vb/default.asp?lngWId=8)
Javascript (http://domain.com/vb/default.asp?lngWId=14)
Java (http://domain.com/vb/default.asp?lngWId=2)
C/C++ (http://domain.com/vb/default.asp?lngWId=3)
SQL (http://domain.com/vb/default.asp?lngWId=5)
Perl (http://domain.com/vb/default.asp?lngWId=6)
ASP classic (http://domain.com/vb/default.asp?lngWId=4)
VB classic (http://domain.com/vb/default.asp?lngWId=1)
Delphi (http://domain.com/vb/default.asp?lngWId=7)
Cold Fusion (http://domain.com/vb/default.asp?lngWId=9)

Code/Articles (#)
Newest (http://domain.com/vb/scripts/BrowseCategoryOrSearchResults.asp?grpCategories=-1&optSort=DateDescending&
txtMaxNumberOfEntriesPerPage=10&blnNewestCode=TRUE&blnResetAllVariables=TRUE&lngWId=5)
Browse categories (http://domain.com/vb/scripts/BrowseAllCategories.asp?lngWId=5)
Search (http://domain.com/vb/scripts/search.asp?lngWId=5)
----------------------- (#)
Upload code / articles (http://domain.com/vb/authors/determine_author_type.asp?lngWId=5)
Open letter from moderators (http://domain.com/vb/misc/OpenLetterFromPSCModerators.asp?lngWId=5)
----------------------- (#)
Articles & tutorials (http://domain.com/vb/Tutorial/default.asp?lngWId=5)
Recommended reading (http://domain.com/vb/Bookstore/default.asp?lngWId=5)
Top Code (#)
Coding contest (http://domain.com/vb/contest/ContestInfo.asp?lngWId=5)
Coding contest leader board (http://domain.com/vb/contest/ContestAndLeaderBoard.asp?lngWId=5)
Coding contest 'All-Time Hall of Fame' (http://domain.com/vb/scripts/BrowseCategoryOrSearchResults.asp?grpCategories=-1&
txtMaxNumberOfEntriesPerPage=10&blnTopCode=True&blnResetAllVariables=TRUE&lngWId=5)
----------------------- (#)
Code of the day newsletter (http://domain.com/vb/CodeOfTheDay/signup.asp?lngWId=5)
Community (#)
Ask a pro discussion forum (http://domain.com/vb/discussion/default.asp?lngWId=5)
Games (http://www.vWorker.com/RentACoder/DotNet/misc/Games.aspx?lngWId=5)
Code of the day newsletter (http://domain.com/vb/CodeOfTheDay/signup.asp?lngWId=5)
Jobs (#)
Search for a job (http://domain.com/vb/jobs/SearchJobs.asp?lngWId=5)
Post a job (http://domain.com/vb/jobs/PostJob.asp?lngWId=5)
Other (#)
My profile (http://domain.com/vb/authentication/MyPlanetSourceCode/CustomizeInfo.asp?lngWId=5)
How to link to us (http://domain.com/vb/LinkToUs/default.asp?lngWId=5)
Awards/Reviews/Raves! (http://domain.com/vb/about/Awards.asp?lngWId=5)
Advertising/Media kit (http://domain.com/vb/advertisement/scripts/rates.asp?lngWId=5)
Feedback (http://domain.com/vb/feedback/feedback.asp?lngWId=5)
About the site (http://domain.com/vb/about/AboutTheSiteAndAuthor.asp?lngWId=5)
Goto… (#)
SQL home (http://domain.com/vb/default.asp?lngWId=5)
Site home (http://domain.com/PlanetSourceCode/default.asp?lngWId=-1)
Other sites (http://domain.com/vb/scripts/OtherLinks.asp?lngWId=5)

Site Wide Message: (current site time 6/13/2011 12:02:54 AM EDT)

A big thank you to Mr. Clinton Williams who made an incredibly generous donation to Planet Source Code's T1 fund. On behalf of myself and all the users of Planet Source Code, thank you Mr. Williams for helpi

Writing a (javasc ript::void) Print


Stored

1 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

(http://domain.com/vb/scripts/EmailToFriend.asp?lngWId=5&txtCodeId=127&txtCodeName=Writing%2520a%2520Stored%2520Procedure& Email
Procedure txtCodeDescription=This%2520article%2520is%2520geared%2520for%2520beginners%2520wanting%2520to%2520learn%2520stored%2520procedures txtCodeDescripti
%2E%2520No%2520prior%2520experience%2520on%2520stored%2520procedures%2520is%2520required %2E%2520No%
%2C%2520however%2520a%2520basic%2520understanding%2520of%2520SQL%2520Query%2520Language%2520might%2520be%2520needed%2E) %2C%2520howe
Submitted on: 7/21/2000 1:12:46 PM
By: Nathan Pond (http://domain.com/vb/authors/ShowBio.asp?lngAuthorId=332084962&lngWId=5)
Level: Beginner
User Rating: By 124 Users
Compatibility:SQL Server 7.0

Users have accessed this article 241811 times.


(http://www.pscode.com
/ads/ad_router.asp?lngWId=5&txtURL=http:
//www.planet-source-code.com/vb/contest
/contest.asp&
txtFromUrl=%2Fads%2FShowAd%2EAsp&
lngWMId=989&lngAVDRId=833260)

This article is geared for beginners wanting to learn stored procedures. No prior experience on stored procedures is required, however a basic understanding of SQL Query Language might be needed.

Terms of Agreement:
By using this article, you agree to the following terms...

1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
3. You may link to this article from another website, but ONLY if it is not wrapped in a frame.
4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.

ENTER>

Writing a Stored Procedure

By Nathan Pond (mailto:nathan@npond.com

If you're anything like me, you don't easily pick up on


by hearing about them. When I first installed my MS SQL
opened up a whole new world of features that I had neve
Stored Procedures. This article is designed to tell you
procedures. I am using Microsoft (#)
SQL Server 7.0, but these examples should work in
any SQL version.

Writing Stored Procedures doesn't have to be hard. When


technology, I went to every newsgroup, web board, and I
for answers. Through all the complicated examples I fou
week before I finally got a working stored procedure. I
show you what I mean:

Normally, you would call a database with a query like:

Select column1, column2 From Table1

To make this into a stored procedure, you simple execut

CREATE PROCEDURE sp_myStoredProcedure


AS
Select column1, column2 From Table1
Go

That's it, now all you have to do to get the recordset


stored procedure. You can simply call it by name like t

2 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

sp_myStoredProcedure

Note: You can name a stored procedure anything you want


procedure with that name doesn't already exist. Names d
sp_ but that is something I choose to do just as a nami
somewhat a standard in the business world to use it, bu
it.

Now, I realize you aren't gaining much in this example.


to make it easy to understand. Later in this article, w
can be useful, for now let's look at how you can call a
parameters.

Let's say that we want to expand on our previous query


So we would have:

Select column1, column2 From Table1

Where column1 = 0

Well, I know we could hard code the 'Where column1 = 0'


procedure. But wouldn't it be neat if the number that 0
in as an input parameter? That way it wouldn't have to
4, etc. and you wouldn't have to change the stored proc
deleting the stored procedure we already created. Don't
with the added feature of an input parameter. We will d

DROP PROCEDURE sp_myStoredProcedure

Now we can recreate it with the input parameter built i

CREATE PROCEDURE sp_myStoredProcedure


@myInput int
AS
Select column1, column2 From Table1
Where column1 = @myInput
Go

Ok, why don't we pause here and I'll explain in more de


off, the parameter: you can have as many parameters as
Parameters are set when the stored procedure is called,
receives it into a variable. @myInput is a variable. Al
procedure have a @ symbol preceding it. A name preceded
variables. Other than that, you can name a variable any
declare a variable, you must specify its datatype. In t
type Int (Integer). Now, before I forget, here's how to
with a parameter:

sp_myStoredProcedure 0

If you want more than one parameter, you seperate them


stored procedure and the procedure call. Like so:

CREATE PROCEDURE sp_myStoredProcedure


@myInput int,
@myString varchar(100),
@myFloat
AS

3 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

.....
Go

And you would call it like this:

sp_myStoredProcedure 0, 'This is my string', 3.45

Note: The varchar datatype is used to hold strings. You


of the string when you declare it. In this case, the va
for 100 characters to be help in it.

Now, I'm sure some of you are wondering if there is a d


from ASP. There really isn't, let's take our first stor
show how it is called from ASP. If it wasn't a stored p
something like this:

>%
dim dataConn, sSql, rs
set dataConn = Server.CreateObject("ADODB.Conn
dataConn.Open "DSN=webData;uid=user;pwd=passwo
sSql = "Select column1, column2 From Table1"
Set rs = dataConn.Execute(sSql) 'execute sql c
%>

Now let's see how we call the stored procedure.

>%
dim dataConn, sSql, rs
set dataConn = Server.CreateObject("ADODB.Conn
dataConn.Open "DSN=webData;uid=user;pwd=passwo
sSql = "sp_myStoredProcedure"
Set rs = dataConn.Execute(sSql) 'execute sql c
%>

As you can see, the only difference is the query that i


stored in the sSql command. Instead of being the actual
name of the stored procedure. Now let's take a quick lo
it with parameters. In our second example, we created t
accept one integer parameter. Here's the code:

>%
dim dataConn, sSql, rs, myInt
myInt = 1 'set myInt to the number we want to
set dataConn = Server.CreateObject("ADODB.Conn
dataConn.Open "DSN=webData;uid=user;pwd=passwo
sSql = "sp_myStoredProcedure " & myInt
Set rs = dataConn.Execute(sSql) 'execute sql c
%>

Now, before I get to far, let me introduce the ALTER co


stored procedures, so you don't have to drop them then
the ALTER command like this:

4 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

ALTER PROCEDURE sp_myStoredProcedure


AS
......
Go

This will overwrite the stored procedure that was there


will keep permissions, so it is better than dropping an

As promised I am going to dive into more detail about s


by answering a common question I received via e-mail. M
possible, and if so how to do it, to use stored procedu
statements. Absolutely!!! Anything that you can accompl
accomplished in a stored procedure, simply because a st
statements. Let's look at a simple INSERT example.

CREATE PROCEDURE sp_myInsert


@FirstName varchar(20),
@LastName varchar(30)
As
INSERT INTO Names(FirstName, LastName)
values(@FirstName, @LastName)
Go

Now, call this procedure with the parameters and it wil


'Names' table with the 'FirstName' and 'LastName' colum
approiately assigned. And here is an example of how to
from an ASP page:

>%
dim dataConn, sSql
dim FirstName, LastName
FirstName = "Nathan"
LastName = "Pond"
set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open "DSN=webData;uid=user;pwd=password" 'mak
sSql = "sp_myInsert '" & FirstName & "', '" & LastName
dataConn.Execute(sSql) 'execute sql call
%>

Remeber, you can use stored procedures for anything, in


DELETE calls. Just embed a sql statement into the proce
the above procedure doesn't return anything, so you don
same will be true for UPDATE and DELETE calls. The only
statement that returns a recordset is the SELECT statem

Now, just because a recordset isn't returned, it doesn'


value. Stored procedures have the ability to return sin
Let me show you a practical example of this. Suppose yo
user enters a username and password, and you need to lo
they match, then you allow the user to logon, otherwise
logon page. Without a stored procedures you would do so

>%
dim dataConn, sSql, rs
set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open "DSN=webData;uid=user;pwd=password" 'mak
sSql = "Select * From User_Table Where UserName = '" &
Request.Form("UserName") & "' And Password = '
Request.Form("Password") & "'"
Set rs = dataConn.Execute(sSql) 'execute sql call
If rs.EOF Then
'Redirect user, incorrect login
Response.Redirect "Incorrect.htm"
End If
'process logon code
.............
%>

5 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

Now let's look at how we would accomplish this same tas


First let's write the procedure.

CREATE PROCEDURE sp_IsValidLogon


@UserName varchar(16),
@Password varchar(16)
As
if exists(Select * From User_Table
Where UserName = @UserName
And
Password = @Password)
return(1)
else
return(0)
Go

What this procedure does is take the username and passw


the lookup. If a record is returned the stored procedur
if not the procedure will return 0. No recordset is ret
would use:

>%
<--#INCLUDE VIRTUAL="/include/adovbs.inc"-->
dim dataConn, adocmd, IsValid
set dataConn = Server.CreateObject("ADODB.Connection")
dataConn.Open "DSN=webData;uid=user;pwd=password" 'mak
Set adocmd = Server.CreateObject("ADODB.Command")
adocmd.CommandText = "sp_IsValidLogon"
adocmd.ActiveConnection = dataConn
adocmd.CommandType = adCmdStoredProc
adocmd.Parameters.Append adocmd.CreateParameter("retur
adInteger, adParamReturnValue, 4)
adocmd.Parameters.Append adocmd.CreateParameter("usern
adVarChar, adParamInput, 16, _
Request.Form("UserName"))
adocmd.Parameters.Append adocmd.CreateParameter("passw
adVarChar, adParamInput, 16, _
Request.Form("Password"))
adocmd.Execute
IsValid = adocmd.Parameters("return").Value
If IsValid = 0 Then
'Redirect user, incorrect login
Response.Redirect "Incorrect.htm"
End If
'process logon code
.............
%>

Now lets slow down for a minute and I'll go through wha
a command object for ADO. I did this with:

Set adocmd = Server.CreateObject("ADODB.Command")

Next I had to tell the object what command it would be

adocmd.CommandText = "sp_IsValidLogon"

Notice that the command is the name of the stored proce


You must tell the command object which connection (data
.ActiveConnection. .CommandType is a property that tell
what type of command it is trying to execute. adCmdStor
variable declared in the include file adovbs.inc.
(For more information on adovbs.inc, be sure to read
ADOVBS.INC - Use It! (http://www.4guysfromrolla.com/webtec
It represents the number telling sql that the command i
The .Append method is used to add return values and par
the username and password parameters, as well as set up

6 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

the command with .Execute, and .Parameters("return").Va


the return value from the procedure. I set that to the
If IsValid is 0, the login is incorrect, if it is 1, th

Now even after the explanation this is still a lot to t


is to dive into your server and try a few simple tasks
One note: sometimes I get errors when I try to .Append
I have already set the parameters. Meaning I might get
like this:

>%
.....
Set adocmd = Server.CreateObject("ADODB.Command")
adocmd.CommandText = "sp_IsValidLogon"
adocmd.ActiveConnection = dataConn
adocmd.CommandType = adCmdStoredProc
adocmd.Parameters.Append adocmd.CreateParameter("usern
adVarChar, adParamInput, 16, Request.Form("UserName"))
adocmd.Parameters.Append .CreateParameter("password",
adVarChar, adParamInput, 16, Request.Form("Password"))
adocmd.Parameters.Append .CreateParameter("return", _
adInteger, adParamReturnValue, 4)
adocmd.Execute
IsValid = adocmd.Parameters("return").Value
.....
%>

I'm not exactly sure why this happens, but I just made
value first, then the parameters.

Now I know what some of you are saying. "The original A


and password without using a stored procedure is so muc
me! Can Stored Procedures actually be used to improve e
asked, because although the example above did require a
realize that it is much more efficient. Stored procedur
efficiency, though. For a full explanation of the benef
to read the SQL Guru's Advice (http://www.4guysfromrolla.
And now I am going to show you an example of a task whe
your database calls.

Assume you have the same script as before for validatin


really does is say whether it is a valid username and p
functionality in to log all failed attempts at logging
'FailedLogons'. If you weren't using a stored procedure
make another call to the database from your ASP code. H
stored procedure, we don't have to touch the ASP code a
procedure like so:

ALTER PROCEDURE sp_IsValidLogon


@UserName varchar(16),
@Password varchar(16)
As
if exists(Select * From User_Table
Where UserName = @UserName
And
Password = @Password)
begin
return(1)
end
else
begin
INSERT INTO FailedLogons(UserName, Password)
values(@UserName, @Password)
return(0)
end
Go

Wasn't that neat? But that's not all, while we're at it


functionality? Let's say that we want to run a check on
there have been more than 5 incorrect logins for that u
account will be disabled. We would have to have the 'Fa
up to have a 'dtFailed' column with a default value of
So when the incorrect logon is inserted into the table,
automatically. Then we would modify our stored procedur

7 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

ALTER PROCEDURE sp_IsValidLogon


@UserName varchar(16),
@Password varchar(16)
As
if exists(Select * From User_Table
Where UserName = @UserName
And
Password = @Password
And
Active = 1)
begin
return(1)
end
else
begin
INSERT INTO FailedLogons(UserName, Password)
values(@UserName, @Password)

declare @totalFails int


Select @totalFails = Count(*) From FailedLogons
Where UserName = @UserName
And dtFailed > GetDate()-1
if (@totalFails > 5)
UPDATE User_Table Set Active = 0
Where UserName = @UserName
return(0)
end
Go

Now, let's take a closer look at what I was doing. Firs


username and password exist on the same row, and that t
user and exit the procedure. If the login is not ok tho
thing the procedure does is insert the record into the
Next we declare a variable to hold the number of failed
assign that value by using a sql statement to retrieve
within the same day. If that number is greater than 5,
hack that account so the the username will be disabled
'User_Table' to 0. Finally, return 0 letting the callin
the login was unsuccessful. To accomplish this same tas
needed to make 4 database calls. The way we just did it
plus the fact that all that functionality we added at t
we didn't have to touch the ASP code at all!

Note about 'begin/end': When using an 'If' statement in


as you keep the conditional code to one line you won't
'end' statement. Example:

if (@myvar=1)
return(1)
else
return(2)

However, if you need more than one line, it is required


and end. Example:

if (@myvar=1)
begin
do this.....
and this.....
return(1)
end
else
begin
do this....
return(2)
end

I hope that I have given enough information to keep you


If you're anything like me, getting the basics is the h
and learn on your own. That is why I decided to create

8 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

free to e-mail me at nathan@npond.com (mailto:nathan@npo


questions or comments about any of my articles.

Happy Programing!

Make extra programming $$$ on over a thousand o


projects like this one!

Title: Mobile App(repost)


Max Bid: $55,000
Description: A description of the requirements is attach

Or offload your extra work by posting your own pro

Report Bad Submission


Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote!

What do you think of this article(in the Beginner category)?


(The article with your highest vote will win this month's coding contest!) (http://domain.c om/vb/contest/c ontest.asp?lngWId=5)
Excellent Good Average Below Average Poor See Voting Log (http://domain.com/vb/scripts/voting/VoteLog.asp?txtCodeId=127&txtCodeName=Writing%20a%20Stored%20Proc

Other User Comments


7/22/2000 2:30:20 PM : gary.klemm@weirton.com (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=22780191&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3Ftx
Stored Procedures
(If this comment was disrespectful, please report it (#) .)

7/24/2000 3:35:09 PM : Leo (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=22926911&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%3


Good Job!!!
(If this comment was disrespectful, please report it (#) .)

7/25/2000 5:43:14 PM : Imran (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=442759943&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId%


Nathan I love the way you explained Stored procedure. I have use stored procedure in Oracle for my class project. Since you mentioned you Installed SQL SERVER 7.0 I was wondering what books did you buy for administration MS SQL SERVER 7.0
What books really helped you.
Because I have to install it on my NT Server which I just installed 2 day ago.
I have no clue how am I going to install it and administor it. I will be using MS SQL SERVER for my upcomming projects. So can you HELP.
Regards
Imran

(If this comment was disrespectful, please report it (#) .)

7/25/2000 10:18:12 PM : Nathan Pond (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=332084962&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Imran,
Actually I don't really have any recommendations. I first learned some of the basics on usign MS SQL 6.5, and then a friend helped me upgrade to 7.0. Most of the stuff I learned was just from playing around with it. SQL 7 is VERY easy to install. I'm sure there are some goo

Regards,
Nathan
(If this comment was disrespectful, please report it (#) .)

7/28/2000 10:53:02 AM : Sam Abraham (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=332052202&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


A well explained mix of Asp, and stored procedures yet simple to understand even for Sql Server beginers like me. Articles like this are an asset to the programming community. A job well done.
(If this comment was disrespectful, please report it (#) .)

7/29/2000 1:52:13 PM : Brian Lockwood (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=552808284&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId%
Excellent article this is the "RIGHT" way to do data access. For a tool that can write stored procedures automatically and uses ADO command objects in VB or ASP to call them using this same syntax see www.lockwoodtech.com. There are products for SQL Se
UUID="00000200-0000-0010-8000-00AA006D2EA4" NAME="ADO Type Library"-->"
(If this comment was disrespectful, please report it (#) .)

8/3/2000 10:24:08 AM : Manish (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=552901524&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Fantastic. Well, there are tons of site and lot of articles telling you about stored procedures and not to add some articles are not worded nicely. This article was not only worded nicely put was exactly what one would to start writing stored procedure. And to top it all
(If this comment was disrespectful, please report it (#) .)

8/23/2000 1:27:34 PM : Topaz2000 (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=33201752&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsourc e%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId%3


Perfect Just what I was looking for
Thanks to the Author and planet-source-code
(If this comment was disrespectful, please report it (#) .)

9 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

10/26/2000 2:02:04 AM : Charl (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=664057195&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Thanks Nathan for your help.
Now i can jump into using SP's as I am currently creating software that will need the most effecient menas of finding and returning data from a huge DB.
Thanks
(If this comment was disrespectful, please report it (#) .)

10/26/2000 2:03:39 AM : Charl (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=664057195&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Thanks Nathan, this tutor was very useful to me as a newby in SP's.
I will definatley be using SP's for more effecient queries to by Db via my ASP pages and VB apps.
Thank you.
(If this comment was disrespectful, please report it (#) .)

11/28/2000 2:35:36 AM: Ernest (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=774703266&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


Hi! I like the way you presented. You let me know the Stored Procedures easily. Keep on! I will read what you write!! One thing that I do not like. The page is not printer friendly. Some text at the right side are truncated!!
(If this comment was disrespectful, please report it (#) .)

1/2/2001 3:40:21 PM : mmroberts (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=331966242&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


Excellent article. It was referred to me by a friend who is learning SQL. I am a web developer who struggled with learning this stuff on my own. I wish I would have had this article then! Keep up the good work!
(If this comment was disrespectful, please report it (#) .)

3/8/2001 4:11:00 PM : Joseph M. Ferris (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=442650043&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


Nathan, Great Job! Need a quick refresher on SP's and this did the trick. Thanks.
(If this comment was disrespectful, please report it (#) .)

4/19/2001 5:06:08 PM : sampathgowri (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=227979691&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Hi,
It was really very good. Why don't you give one full project description. Telling as how to start, screen design, step by step,till reports, etc.
Thanks and Regards
sampathgowri

(If this comment was disrespectful, please report it (#) .)

4/24/2001 6:02:32 AM : Daniel Kent (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=228096591&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


Are you aware that prefixing user defined stored procedures with sp, as you have done in this article, makes their performance slightly worse than using another prefix?

This is because SQL server uses sp for built in stored procedures. When you call a stored procedure that starts with sp, SQL server will look for the built in procedure first, slowing your procedure calls down.
(If this comment was disrespectful, please report it (#) .)

4/24/2001 6:06:03 AM : Daniel Kent (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=228096591&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


Are you aware the prefixing user defined stored procedures with "sp" degrades their performance slightly?

SQL server uses sp as a prefix for its built in stored procedures. If you prefix your stored procedures with sp, SQL server will check for a built in stored procedure first, slighly affecting performance. Its a small amount but as we can choose whatever we want to prefix our spr

Good article though!


(If this comment was disrespectful, please report it (#) .)

5/28/2001 5:20:06 PM : Johanna (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=229039421&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


This really is excellent! I developed an understanding of stored procedures, and saw how I could put it to use in an ASP application in 5(!) minutes!

Thanks, and I look forward to more of your tutorials!


Johanna
(If this comment was disrespectful, please report it (#) .)

6/5/2001 11:45:24 AM : meyy (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=229297441&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsourc e%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId%


good work! keep it up

do u have any help writing stored procedure to typically create a flat file from the database in comma seperated format..

thanks

palani60173@lycos.com

(If this comment was disrespectful, please report it (#) .)

8/18/2001 1:13:56 PM : max mail (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2211493831&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


cool article. the reason you have to append the 'return' parameter to the parameters collection first is because the stored procedure returns its value before any other output parameter. the order of other parameters appended to the collecttion has to match the order of paramete

(If this comment was disrespectful, please report it (#) .)

8/23/2001 4:40:08 AM : Kishore Kumar (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=229984281&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%


Excellent article for a beginner like me, thanks a lot, please keep posting like this, once again thanks a lot
(If this comment was disrespectful, please report it (#) .)

9/18/2001 4:55:38 PM : Eric Krauss (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=228735131&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId%


This article is PERFECT!!!! I just got a SQL 2000 Server for my databases yesterday and the stored procedures were the only thing I could not figure out. I went out and bought a book, looked all over the internet, and nothing. After reading your article I understand it like it is
(If this comment was disrespectful, please report it (#) .)

1/14/2002 12:36:07 AM : Greg Beard (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=3315929912&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId
Excellent - thanks.
(If this comment was disrespectful, please report it (#) .)

2/7/2002 11:19:03 PM: Derreck (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=3317087362&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId
YOU ARE DA MAN!!! Finally, i can automate tasks in my shopping cart programs, and reduce overhead. You are a life saver!
(If this comment was disrespectful, please report it (#) .)

10 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

3/18/2002 4:52:12 AM : weng54 (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2213013531&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId


thanks man!
(If this comment was disrespectful, please report it (#) .)

3/19/2002 7:49:26 AM : Ivin (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=4423341693&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId


Execellent...it was short
(If this comment was disrespectful, please report it (#) .)

3/19/2002 7:53:50 AM : Ivin (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=4423341693&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId


Excellent
(If this comment was disrespectful, please report it (#) .)

6/20/2002 5:57:09 AM : Rags (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=5532400014&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId


Good One Man :)
(If this comment was disrespectful, please report it (#) .)

6/26/2002 7:18:46 AM : Somenath Dey (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=5532877064&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId


Excellent Contents.. Perfect for some one like me new to this area.. Good job done..
(If this comment was disrespectful, please report it (#) .)

7/6/2002 7:13:06 AM : Alkesh Parikh (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=4425768873&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId


Excellent Article...Thanks a lot ...u make work so much easier for so many devlopers like me...keep it up
(If this comment was disrespectful, please report it (#) .)

7/19/2002 2:11:43 PM : Saverio Mercurio (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=3320199212&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeI


A bit late, but previous comments regarding not using "sp" as the prefix should actually be that you shouldn't use "sp_" (note the underscore). It's OK to use "sp" (e.g., "spMyStoredProc"). From the SQL Server Online doc:

It is strongly recommended that you do not create any stored procedures using sp_ as a prefix. SQL Server always looks for stored procedures beginning with sp_ in this order:

1. Look for the stored procedure in the master database first.


2. Look for the stored procedure based on any qualifiers provided (database name or owner).
3. Look for the stored procedure using dbo as the owner, if one is not specified.
(If this comment was disrespectful, please report it (#) .)

9/25/2002 10:47:28 PM : (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=2210366201&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Sir, I need some explanation on Sql Server 7. How u can link a SQL Server 7 to different platform such as Linux, Sun Solaris.Need help urgently.Pls give some idea . sumipraveen@hotmail.com
(If this comment was disrespectful, please report it (#) .)

11/20/2002 2:38:01 PM : (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=7743902496&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

great article!
by the way, i think sp_ stands for system procedure and not stored procedure.
(If this comment was disrespectful, please report it (#) .)

1/29/2003 2:58:09 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=7748199026&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Thanks. You are a life


(If this comment was disrespectful, please report it (#) .)

2/12/2003 9:27:56 AM : Felipe Lima A. Menezes (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=229571071&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3Ftx
Great article!
(If this comment was disrespectful, please report it (#) .)

3/16/2003 10:06:20 PM : (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=8854241117&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId

Thanks for your article. Using plain common sense explanations helped me to know
(If this comment was disrespectful, please report it (#) .)

4/5/2003 6:23:08 AM : gswgroup (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2210013471&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId


Thanks Nathan, I read this article on 4guysfromrolla.com and thanks so much for teaching me sql server stored procedures, and accessing them with ADO.

Thanks again,
(If this comment was disrespectful, please report it (#) .)

4/10/2003 2:34:40 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=1956140958&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

where can I find the exact same (wonderful) explanation of stored procedures but for calling them from VB 6.0 (not .asp)?

(If this comment was disrespectful, please report it (#) .)

7/8/2003 10:27:12 PM : (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=1962512008&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeId

this is not so complecated and easy thats why it is great.


(If this comment was disrespectful, please report it (#) .)

7/16/2003 10:56:50 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2163045379&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId

Hi, The article was very good and everything will work perfectly for SQL Server, however Oracle is another ugly beast that does not work quite as cleanly as SQL Server and requires things such as cursors and packages to return multiple resultsets. Good job though covering
(If this comment was disrespectful, please report it (#) .)

2/17/2004 3:15:01 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2278303931&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

It was a really helpful article for me to understand how to use stored procedures. Thank you so much for being kind enough to write this article in a manner others can easily understand. I think you have been 100% successful on this article. Again thank you very much and wis
(If this comment was disrespectful, please report it (#) .)

2/26/2004 3:24:00 AM : Testguru (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=8849541457&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


I pasted some of the portion in the word and took print out. It is inserting character Q after every word can anybody tell me how to overcome it.
(If this comment was disrespectful, please report it (#) .)

11 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

4/17/2004 8:45:09 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2274095881&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Very good & very easy Thanks man


(If this comment was disrespectful, please report it (#) .)

5/27/2004 4:24:59 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2285533391&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Thank you so very much for your great help!!!


(If this comment was disrespectful, please report it (#) .)

7/9/2004 2:42:21 AM : andrew (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=7748199026&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


Good stuff. Keep up the good work
(If this comment was disrespectful, please report it (#) .)

7/10/2004 6:49:07 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2288456661&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Thanks to you Nathan for helping me out on working with Stored Procedures. I am a beginner on SQL Server2000 and I dont have knowledge on Stored Procs. Your article helps me understand and get me started to work with SP's. Thanks again.
(If this comment was disrespectful, please report it (#) .)

9/1/2004 2:39:34 PM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2169164849&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

Very Helpful article. Very easy to understand. Good Job.


(If this comment was disrespectful, please report it (#) .)

9/22/2004 5:07:22 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2292804501&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

It really helped me in understanding the basic steps of writing stored procedures..Thanks for giving such valuable notes!!
(If this comment was disrespectful, please report it (#) .)

9/24/2004 3:42:06 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2292879051&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId

want To learn more in Stored Procedure


Can U guide me?

(If this comment was disrespectful, please report it (#) .)

2/8/2005 5:31:39 PM : BradFlood (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2277400721&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeId


I wrote my wrote and executed my first stored procedure in 5 minutes. Great Guide! Thanks. :)
(If this comment was disrespectful, please report it (#) .)

2/22/2005 7:18:39 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=22102538701&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeI

Great.It really helped me in understanding the basic steps of writing stored procedures..Thanks for giving such valuable notes.can i use it with delphi since want to hide password from unauthorized users and have user-login table and user-login form , if so would u give me idea
(If this comment was disrespectful, please report it (#) .)

2/22/2005 7:24:41 AM : (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=22102538701&txtReferralPage=http%3A%2F%2Fwww %2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeI

thanks much , now i m clear about stored preocdure. i have database project ms-sql server with delphi 7 , i have user-login table with field username and userpassword , and have userloginForm , so to hide password from unathorized users . so how to manage it , any help
(If this comment was disrespectful, please report it (#) .)

4/21/2005 2:33:06 AM : Ganesh (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2274095881&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


This is really great
(If this comment was disrespectful, please report it (#) .)

3/1/2006 8:35:25 PM : Yoga_Raj (http://domain.com/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=2275523601&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


You have great potential in becoming a professional technical facilitator or perhaps a good technical book author.
(If this comment was disrespectful, please report it (#) .)

7/2/2006 5:24:26 AM : CataLyst-KK (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=2290790741&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ec om%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId


Hello,

nice work. i think you forgot one topic of returning outputs.

@FirstName varchar(20) output

now this will return an output in VB or some else languages.


(If this comment was disrespectful, please report it (#) .)

5/8/2007 10:18:45 PM : Rahat651 (http://domain.c om/vb/feedbac k/EmailUser.asp?lngWId=5&lngToPersonId=77443434146&txtReferralPage=http%3A%2F%2Fww w%2Eplanet%2Dsourc e%2Dc ode%2Ecom%2Fvb%2Fsc ripts%2FShowCode%2Easp%3FtxtCodeI
Good work. But did not write on relation between multiple stored procedures.
(If this comment was disrespectful, please report it (#) .)

7/13/2007 6:34:04 AM : imbcsdn (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=77465240196&txtReferralPage=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeI


FINANCE FOR SMALL BUSINESS

IMBC SDN.BHD from Malaysia willing to invest in small and medium sized company/business (any type of business).

„« Very Less Interest


„« Loan based on Postdated Cheques
„« Less Documentation
„« Loan ranging from 5, 00,000 to 10, 0000,000 with easy repayment options
„« Company should be in India
„« Processing period one week

Contact:
Mr.Vasan,
General Manager,
IMBC.SDN.BHD
Ph: 0060146301333.
or
E-Mail to: detect@idmservices.net

(If this comment was disrespectful, please report it (#) .)

12 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

2/4/2008 4:29:31 AM : NavasKhan (http://domain.com/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=77475027526&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsource%2Dcode%2Ecom%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeI


Its really good
(If this comment was disrespectful, please report it (#) .)

3/4/2008 4:55:16 AM : Shruti (http://domain.c om/vb/feedback/EmailUser.asp?lngWId=5&lngToPersonId=77481931626&txtReferralPage=http%3A%2F%2Fw ww%2Eplanet%2Dsourc e%2Dcode%2Ec om%2Fvb%2Fscripts%2FShow Code%2Easp%3FtxtCodeI


Superb Article! Its really easy to understand. Thanks so much.
(If this comment was disrespectful, please report it (#) .)

Cheap VPS/WebHosting hostrail.com


HostRail.Com Buy Now!

SQL Server ODBC Drivers www.openlinksw.com


Quick & secure access from Linux, Windows, OSX
& other Unix OSs...

SQL Server SSIS Tasks www.nsoftware.com/ssis/


SSIS Tasks for AS2, SFTP, FTPS, POP3, IMAP,
SMTP, SSH, OFTP, etc

Business Directory www.globalsources.com/mag/free/


Get free digital copy - Find quality suppliers from
China & Asia

Add Your Feedback!

Note:Not only will your feedback be posted, but an email will be sent to the code's author from the email account you registered on the site, so you can correspond directly.

NOTICE: The author of this article has been kind enough to share it with you. If you have a criticism, please state it politely or it will be deleted.

For fe e dback not re late d to this particular article , ple ase click he re (http://domain.com/vb/fee dback/fe edback.asp?lngWId=5&intTypeOfInquiry=3) .

To post feedback, first please login (http://domain.com/vb/authentication/Login.asp?txtReturnURL=http%3A%2F%2Fwww%2Eplanet%2Dsource%2Dcode%

Quick search for

Search Term…

(http://www.pscode.com/ads/ad_router.asp?lngWId=5&txtURL=&txtFromUrl=%2Fads%2FShowAd%2EAsp&lngWMId=1548&lngAVDRId=833261)
Login (http://domain.com/vb/authentication/Login.asp?txtReturnURL=%2Fvb%2Fscripts%2FShowCode%2Easp%3FtxtCodeId%3D127%26lngWId%3D5)

13 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

Latest postings for SQL.

(javascript:ShowPopupWindowXYWithScrollbar
/misc/NewUpdateIconExplanation.asp',200,300)

A Simple SQL Code to


determine Dates for
current and previous
months
(http://domain.com
/vb/scripts
/ShowCode.asp?txtCodeId=1379&
lngWId=5)

By DuaneÂ
0;Warsham on 6/10
Click here to put this ticker
on your site! (http://domain.com/vb/LinkToUs/default.asp?lngWId=5#NewCodeTicker)
(javascript:ShowPopupWindowXYWithScrollbar
Add to/misc/NewUpdateIconExplanation.asp',200,300)
Active Desktop (http://domain.com/vb/LinkToUs/default.asp?lngWId=5#NewCodeTicker)
SQL
Add this JOINto
ticker EXAMPLE
your desktop! (http://domain.com/vb/LinkToUs/default.asp?lngWId=5#NewCodeTicker)
(http://domain.com
/vb/scripts
Daily/ShowCode.asp?txtCodeId=1378&
Code Email
lngWId=5)

Click here to join the


'Code By NEERAJ
of the Day' mailing list (http://domain.com/vb/CodeOfTheDay/signup.asp?lngWId=5) !
KUMAR SHARMA
on 5/24

This Site on CD
(javascript:ShowPopupWindowXYWithScrollbar
/misc/NewUpdateIconExplanation.asp',200,300)
Over 7,000 submissions on a super fast CD (http://www.exhedra.com/exhedra/PlanetSourceCode/CD.aspx) !

SQL[RND]
(http://domain.com
/vb/scripts (http://domain.com
/vb/CD
/ShowCode.asp?txtCodeId=1377&
lngWId=5) /PscCd.asp?lngWId=5)

By NEERAJ
KUMAR
Get Paid SHARMA
To Code
on 5/18

(javascript:ShowPopupWindowXYWithScrollbar
/misc/NewUpdateIconExplanation.asp',200,300)
(http://www.vWorker.comNow taking registrations on Rent a Coder (http://www.vWorker.c om/RentACoder/DotNet/SoftwareCoders/HowItWorks.aspx) !
/RentACoder/DotNet
SQL Function For
/SoftwareCoders
Getting The Last Day of
/HowItWorks.aspx)
the Month
(http://domain.com
/vb/scripts
Open letter from moderators (http://domain.com/vb/misc/OpenLetterFromPSCModerators.asp?lngWId=5)
/ShowCode.asp?txtCodeId=1376&
About the site (http://domain.com/vb/about/AboutTheSiteAndAuthor.asp?lngWId=5)
lngWId=5)
Feedback (http://domain.com/vb/feedback/feedback.asp?lngWId=5)
Link to thePatel
By Shirish Site (http://domain.com/vb/LinkToUs/default.asp?lngWId=5)
on
Awards
3/19 (http://domain.com/vb/about/Awards.asp?lngWId=5)
Advertising (http://domain.com/vb/advertisement/scripts/rates.asp?lngWId=5)
Privacy (http://domain.com/vb/scripts/privacy.asp?lngWId=5)
(javascript:ShowPopupWindowXYWithScrollbar
/misc/NewUpdateIconExplanation.asp',200,300)

Oracle Apps - Useful


links (http://domain.com
/vb/scripts
/ShowCode.asp?txtCodeId=1375&
lngWId=5)

By Dinesh Kumar S
on 3/3

(javascript:ShowPopupWindowXYWithScrollbar
/misc/NewUpdateIconExplanation.asp',200,300)

14 of 15 6/13/2011 10:10 AM
Writing a Stored Procedure by Nathan Pond http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeI...

(http://www.vWorker.com/RentACoder/DotNet/SoftwareCoders/HowItWorks.aspx)

Code/Articles

Newest (http://domain.com/vb/scripts/BrowseCategoryOrSearchResults.asp?grpCategories=-1&optSort=DateDescending&txtMaxNumberOfEntriesPerPage=10&
blnNewestCode=TRUE&blnResetAllVariables=TRUE&lngWId=5)
Browse categories (http://domain.com/vb/scripts/BrowseAllCategories.asp?lngWId=5)
Search (http://domain.com/vb/scripts/search.asp?lngWId=5)
Upload code / articles (http://domain.com/vb/authors/determine_author_type.asp?lngWId=5)
Open letter from moderators (http://domain.com/vb/misc/OpenLetterFromPSCModerators.asp?lngWId=5)
Articles & tutorials (http://domain.com/vb/Tutorial/default.asp?lngWId=5)
Recommended reading (http://domain.com/vb/Bookstore/default.asp?lngWId=5)

Top Code

Coding contest (http://domain.com/vb/contest/ContestInfo.asp?lngWId=5)


Coding contest leader board (http://domain.com/vb/contest/ContestAndLeaderBoard.asp?lngWId=5)
Coding contest 'All-Time Hall of Fame' (http://domain.com/vb/scripts/BrowseCategoryOrSearchResults.asp?grpCategories=-1&
txtMaxNumberOfEntriesPerPage=10&blnTopCode=True&blnResetAllVariables=TRUE&lngWId=5)
Code of the day newsletter (http://domain.com/vb/CodeOfTheDay/signup.asp?lngWId=5)

Community

Ask a pro discussion forum (http://domain.com/vb/discussion/default.asp?lngWId=5)


Games (http://www.vWorker.com/RentACoder/DotNet/misc/Games.aspx?lngWId=5)
Code of the day newsletter (http://domain.com/vb/CodeOfTheDay/signup.asp?lngWId=5)

Jobs

Search for a job (http://domain.com/vb/jobs/SearchJobs.asp?lngWId=5)


Post a job (http://domain.com/vb/jobs/PostJob.asp?lngWId=5)

Other

My profile (http://domain.com/vb/authentication/MyPlanetSourceCode/CustomizeInfo.asp?lngWId=5)
How to link to us (http://domain.com/vb/LinkToUs/default.asp?lngWId=5)
Awards/Reviews/Raves! (http://domain.com/vb/about/Awards.asp?lngWId=5)
Advertising/Media kit (http://domain.com/vb/advertisement/scripts/rates.asp?lngWId=5)
Feedback (http://domain.com/vb/feedback/feedback.asp?lngWId=5)
About the site (http://domain.com/vb/about/AboutTheSiteAndAuthor.asp?lngWId=5)

Goto…

SQL home (http://domain.com/vb/default.asp?lngWId=5)


Site home (http://domain.com/PlanetSourceCode/default.asp?lngWId=-1)
Other sites (http://domain.com/vb/scripts/OtherLinks.asp?lngWId=5)

Copyright© 1997-2011 by Exhedra Solutions, Inc. (http://www.exhedra.com/) All Rights Reserved.

By using this site you agree to its Terms and Conditions (http://domain.com/vb/scripts/TermsAndConditions.asp?lngWId=5) . Planet Source Code™ and the
phrase "Dream It. Code It"™ are trademarks of Exhedra Solutions, Inc. (http://www.exhedra.com/)

15 of 15 6/13/2011 10:10 AM

S-ar putea să vă placă și