x
login about faq Site discussion (meta-askssc)

Creating an Extended Stored procedure in SQL Server 2000

Does anyone have a good resource and template on how to write an extended stored procedure for a SQL Server 2000 instance?

more ▼

asked Oct 23 '09 at 01:38 PM in Default

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 74 78 82

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

http://msdn.microsoft.com/en-us/library/aa197263(SQL.80).aspx

But there is not much secret , and you need to know C/C++. You can use the gcc compiler (free) , it had the Windows development and is also free Dev-C++, donwload -> http://www.bloodshed.net/devcpp.html.

build the DLL and use sp_addextendedproc to add in sql server 2000

more ▼

answered Oct 23 '09 at 01:48 PM

Laerte Junior gravatar image

Laerte Junior
488 2

Caution: .nextval bumps the value If you want the current value without modifying it, use the .currval method.

Feb 02 '10 at 03:32 PM KillerDBA

Nice catch Killer!

Feb 02 '10 at 05:02 PM HillbillyToad

Thank you guys for providing your valuable answer to this..:)

Feb 03 '10 at 08:31 AM OraLearner

However.....currval can only be used if you've already selected from that sequence in the CURRENT session. I will edit the initial response.

Feb 03 '10 at 03:49 PM Dwayne King

Ah-hah. I didn't know that. Thanks.

Feb 03 '10 at 05:05 PM KillerDBA
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x455
x343
x3

asked: Oct 23 '09 at 01:38 PM

Seen: 1079 times

Last Updated: Oct 27 '09 at 03:34 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.