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, 2009 at 01:38 PM in Default

Steve Jones - Editor gravatar image

Steve Jones - Editor ♦♦
5.1k 78 79 82

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

1 answer: sort voted first


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, 2009 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, 2010 at 03:32 PM KillerDBA
Nice catch Killer!
Feb 02, 2010 at 05:02 PM HillbillyToad
Thank you guys for providing your valuable answer to this..:)
Feb 03, 2010 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, 2010 at 03:49 PM Dwayne King
Ah-hah. I didn't know that. Thanks.
Feb 03, 2010 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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

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



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Oct 23, 2009 at 01:38 PM

Seen: 1604 times

Last Updated: Oct 27, 2009 at 03:34 PM