Solved

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

Posted on 2008-06-15
4
351 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:JAYANSPX
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
amritgill earned 250 total points
ID: 21790882
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
 

Author Comment

by:JAYANSPX
ID: 21790926
thank

but i need code in vb.net  
0
 
LVL 3

Expert Comment

by:amritgill
ID: 21791014
u can use the if exist scenario in vb.net also it should work
0
 

Author Comment

by:JAYANSPX
ID: 21791648
ok
thank's a lot

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now