473,662 Members | 2,631 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to debug stored procedures using SQL 2000

34 New Member
hi all,

how to debug a stored procedure ..

Actually what i did was split the stored procs and took and SQL query and executed it...

but i dont knw how to print the values of these stored procs like for ex the below is th epart of the stored proc

If @ProcessId = 2
BEGIN
Update Vendors
Set ProcessId = 2
where Num = @Num
and RevNum <= @RevNum
and Code = @Code
and Error_Message = isnull(@error_M essage,Error_Me ssage)
--RETURN
END

Actaully i am not able to understand the line
Error_Message = isnull(@error_M essage,Error_Me ssage)

and like why it has cme with the where clause ...

when i try to print the value of error_message , it says to declare it first .After declaring also it still gives an error.
Can you please tell me how to go about and understand the logic of the entire stored proc one by one ....

thanks and Regards
Sanika
Sep 20 '07 #1
1 2130
davef
98 New Member
hi all,

how to debug a stored procedure ..

Actually what i did was split the stored procs and took and SQL query and executed it...

but i dont knw how to print the values of these stored procs like for ex the below is th epart of the stored proc

If @ProcessId = 2
BEGIN
Update Vendors
Set ProcessId = 2
where Num = @Num
and RevNum <= @RevNum
and Code = @Code
and Error_Message = isnull(@error_M essage,Error_Me ssage)
--RETURN
END

Actaully i am not able to understand the line
Error_Message = isnull(@error_M essage,Error_Me ssage)

and like why it has cme with the where clause ...

when i try to print the value of error_message , it says to declare it first .After declaring also it still gives an error.
Can you please tell me how to go about and understand the logic of the entire stored proc one by one ....

thanks and Regards
Sanika
Script the sp and post the code. Also, show how you invoke it.
Sep 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
7969
by: TJ Olaes | last post by:
Hello all, this is my second post to this newsgroup. It's a question about stored procedures and permissions and how these behave between databases. Here's the scenario. I have a database that stores information for a system "A", and I have a different database on the same SQL server that stores the login and other info "LOGIN". I write a stored procedure in the "A" database that checks some tables in the "LOGIN" database, let's call...
11
10744
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures execute in the database server with better performance? Please advise good references for Oracle stored procedures also. thanks!!
1
1664
by: rdshultz | last post by:
Good morning everyone. Could someone tell me if there is a book out there which gives examples of both VB.net code and creating SQL Server 2000 stored procedures and how you get them to work together in the most efficient way. Right now we have a server at our Philadelphia office and I am in our St. Louis office we are connected with a T1 line. We have several Access 2000 applications on the Philly server but when you try to run them...
0
1260
by: JollyK | last post by:
Hello folks, Previously I have debugged stored procedures with VS.NET 2002 on Windows 2000 successfully. I know that in order to debug a stored procedure, I need to enable SQLServer debugging for my solution and the option for this is located via Solution-Properties - Configuration properties - Debugging. Recently I am working on a Windows 2003 machine that has VS.net 2003 enterprise architect edition installed, and I am not being able...
0
992
by: scott | last post by:
xp pro vs 2003 enterprise arch 2003 server with sql 2000 From xp pro and when using the to "step into stored procedure" option upon connection to a database in VS 2003 im getting the message: " cannot debug stored procedures because the SQL server database is not setup correctly or does not have permission to execute <stored procedure name>. Run SQL server setup or contact database administrator ".
45
3391
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
2
3142
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored procedures. It is enabled for SQL stored procedures. It is possible to "Build" and "Run" the Java SPs, it just isn't possible to click on the "Build for Debug" option. Thanks for any help in advance. Michael
0
937
by: Randy | last post by:
Does anyone know of a good tutorial/thread ? I want to debug my sql server 2000 stored procedures within VS2005. I also want to debug the stored procedures associated with the login/role management controls (I don't know if it makes a difference that they have no code to place a breakpoint on), Randy
4
1833
by: Jeff Kish | last post by:
Hi. I am under the understanding that having the sql server 2005 db is not enough (like 2000 was) to debug stored procedures.. that I need to purchase (costly) visual studio 2005. Can someone suggest a free or lower cost alternative? sorry to be so cheap.. its the times I think.
0
1653
by: Ryan | last post by:
PLEASE HELP!! I am trying to do what I think should be the simplest thing. In Visual Studio 2005, I set up a datagrid and then went ot configure a datasource for it. I made my connection to the database using the same connection string as I used to view the databse in server explorer. (In server explorer I see all stored procedures). I then go through the wizard and choose "Specify a custom SQL Statement or Stored Procedure." Then...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1754
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.