On Wed, Nov 23, 2011 at 11:49 AM, Rafael Copquin
<[email protected]> wrote:
> I would like to follow a stored procedure behaviour line by line, as one
> can do in VFP with the debugger.
> I need to know what is the value of the parameters received by the SP
> as they are passed from VFP via SPT, to determine why the heck the SP is
> not working
>
> What are the commands in TSQL or the way to do it in SQL Server?
> I mean, is there a menu option to check to start the debugger in SQL
> Server Express or there is no such thing?
-------------------
Your request is this?
I need to know what is the value of the parameters received by the SP
as they are passed from VFP via SPT, to determine why the heck the SP is
not working.
Debugging in SQL Server for sprocs is not easy like debugging in VFP.
Because it is running on the server as a service. To run through and
step line by line that is. Many of us don't want to do this and we
instead will set up messages to view through the process.
You are using express correct? If so then you cannot debug a sproc.
If you only need to see the values then put a print statement in the
SPOC and it will put the text of a variable into the MESSAGE space of
the running sproc.
I have this :
ALTER PROCEDURE [dbo].[AccountInformation_ins]
@PayByBusinessPartnerID int,
@CurrentBalance decimal (18,2),
@Over30Balance decimal (18,2),
@Over60Balance decimal (18,2),
@Over90Balance decimal (18,2),
@AccountBalance decimal (18,2),
@AvgRecptDays int,
@PaymentPeriod int,
@PaymentTerms varchar(50),
@Currency varchar(10)
as
I can as this:
Print 'AcountBalance'
print @AccountBalance
print '------------'
After you edit the sproc you can execute it and from the new query.
There are two tabs in the results pane to show you the data returned
as well as any messages as the process runs. The Messages will tell
you how many rows are altered, inserted or returned. The more your
sproc does the more details will be in messages.
There is no easy solution here from the express method.
--
Stephen Russell
901.246-0159 cell
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/cajidmylperautz9ynuvp4zvintu7f4kx++a7y2kgmaidzfa...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.