?
Solved

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

Posted on 2008-06-15
4
Medium Priority
?
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
amritgill earned 750 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

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

765 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