how to check store procedure exist or not and how to create with vb.net

HI,
Expert

I need to create store procedure thru vb.net , and check to store procedre exist or not

i am useing sql 2005 and vb.net please help me
JAYANSPXAsked:
Who is Participating?
 
amritgillConnect With a Mentor Commented:
u can try using the follwing...
u will have to replace aaa with your proc name
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[aaa]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[aaa]
GO

Create Proc aaa
...


0
 
JAYANSPXAuthor Commented:
thank

but i need code in vb.net  
0
 
amritgillCommented:
u can use the if exist scenario in vb.net also it should work
0
 
JAYANSPXAuthor Commented:
ok
thank's a lot

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.