(select count(*)
from dto_initial_screening
where (dto_initial_screening.facilityNo = ref_facility.facilityNo and
dto_initial_screening.testDt between '2007-01-01' and '2008-01-01')) as 'TotalScreened',
(select count(*)
from dto_initial_screening
where (dto_initial_screening.testResult = 'POS' and
dto_initial_screening.facilityNo = ref_facility.facilityNo and
dto_initial_screening.testDt between '2007-01-01' and '2008-01-01')) as 'NoOfPositives'
from dto_initial_screening
left join ref_facility on dto_initial_screening.facilityNo = ref_facility.facilityNo
left join ref_region on ref_facility.adrRegionCd = ref_region.regionCd
where
('NoOfPositives') < (select Cast(paramVal as UNSIGNED) from ref_param where paramCd = 'minPositives')
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text ************** System.NullReferenceException: Object reference not set to an instance of an object. at HP.CUE.Video.PlaybackControl.UpdateProgressBar() at HP.CUE.Video.PlaybackControl._ProgressTimer_Tick(Object sender, EventArgs e) at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)
************** JIT Debugging ************** To enable just in time (JIT) debugging, the config file for this application or machine (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the machine rather than being handled by this dialog.
Hello guys! I am trying to debug a sql procedure inside Server Explorer but I can seem to step into each line. When I run the procedure it doesn't stop in the breakpoint I set.
How to test @au_lname's value sends to the following following sql command? Dim MyCommand As New SqlCommand("UPDATE [authors] SET [au_lname] = @au_lname", MyConnection)MyCommand.Parameters.Add(New SqlParameter("@au_lname", SqlDbType.NVarChar)).Value = me.au_lname.text I tried to print the "MyCommand.CommandText.ToString" but only get UPDATE [authors] SET [au_lname] = @au_lname with no value in the command text. Thanks!
Our SQL Servers is giving us a headache, after a certain period in time, either SQL Service automatically shuts down by itself or hangs. I've opened the logs and found hex dumps. Can you help me out with these?
alter PROCEDURE [dbo].[spsite] @fromdate datetime, @todate datetime
AS BEGIN
select site as sitecode, count(id) as t from an where mydate >=@fromdate and mydate<=@todate, count(id) as p from an where p=1 and mydatestage1 >=@fromdate and mydatestage1<=@todate
I know there's a trick to this, that I can't figure out.
Have an SSIS package that I developed and deployed/saved(?) to a file on the SSIS server. Now I need to change the data flows. Did that, no issues, lets me resave the file, but I can't debug or execute the package so I can test what I did is right? Why is the debug drop down box greyed out? There's gotta be something I'm missing here.
Can someone help me with debugging store proc. I am usig VS 2003 and SQL Server 2005 and I have no clue as how to do that if it is possible. I would like to place a break point in my store proc if that is possible. I know if I was in VS 2005 it would be a charm but it's not my case. Thanks
hello,I want to know if it is possible to debug a stored procedure using visual studio 2003 and SQL server 2000.if yes can u help me how to do this?Thanks.
Say I have this query in my stored procedure. The problem I am facing is @OrgUID contains no value, so I put these 2 lines to debug. Am I using the right way to debug? I couldn't see the value of @OrgUID using this way. OrgUID is the PK in Organization. INSERT INTO Organization (OrgName) VALUES (@DealerName)SELECT @OrgUID = @@IDENTITYprint @OrgUIDreturn
Hi,I am using SQL Server Express bundled with Visual Studio 2008 on top of a ASP.NET/C# web application.I have written a stored procedure that appears to behave differently when stepping into the procedure than it does when called from my application, even though the parameter values are apparently identical. I need to debug the parameter values from within the stored procedure itself to see what the difference is. But how can I debug the stored procedure when it is called from the application?I followed the instructions at this page, but VS2008 does not stop within the procedure as expected. It seems I foolishly downloaded VS2008 Professional Edition, so these instructions apparently do not apply to that version (!!).So I thought I would try debugging the parameter values by writing them to a file. I used the procedure on this page to write to an arbitrary file, but every time I try to call it I get the following error: Error: SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online. I opened the SQL Server Surface Area Configuration and enabled the "OLE Automation". I restarted the SQL Server service and VS2008, but I still got the same error, even though "OLE Automation" remains enabled for SQL Server 2005. So I tried issuing the following commands: sp_configure 'show advanced options', 1; GO RECONFIGURE;GOsp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE;GO But if I issue those commands from within a stored procedure, or even an SQL Query window, I get the following error:SQL Execution Error:Executed SQL Statement: sp_configure 'show advanced options', 1; GO RECONFIGURE;GOsp_configure 'Ole Automation Procedures', 1; GO RECONFIGURE;GOError Source: .Net SqlClient Data ProviderError Message: Incorrect syntax near 'GO'.Please - I can't be the only person who is unable to debug his stored procedures. How can I either enable Application Debugging, or enable "OLE Automation"?I appreciate any help you can offer!
If I right-click on a stored procedure, I get the option to "step into stored procedure". However, no little yellow arrow appears that would show which line it's on. Debug/Continue is grayed out. Any ideas? NOTE: I tried to do this in SQL Query Analyzer. Same thing. Just seems like nothing is happening.
I created a stored procedure that is referenced by a SQLDataSource & DetailView on a web page. I tested the stored procedure in Query Analyzer & everyting looks good. When I get to the page to display the detailview, nothing is displayed. I ran SQL Profiler, to see what was happening & the stored procedure isn't being called. I checked & rechecked the references to the SQLDataSource & even tested them in the configuration wizard. I replaced the stored procedure with the query & it worked, except I had to 'hardcode' the variable values.
The stored procedure does return error results when they occur - how can I intercept them?
How can I determine what is happening with this stored procedure? Is there a way to trace it other than with SQL Profiler?
Hi Friends, I have a worst doubt, plese excuse me. and help me to find solution for my doubt. How can i Debug my Sql Stored procedure. and where to do this.
how to debug store procedure from Visual interdev. I am working on Windows NT 4.0 workstation, and SQL database server is on an other Windows NT server machine. I can not step through the store procedure or set breakpoint. Thanks in advanced. YU
How to debug a stored procedure line by line. As i know there is one method of debugging the stored procedure by rightclicking on stored procedure in ObjectBrowser and click Debug. But it is not working properly . Is there any other ways/methods of debugging a stored procedure
Does anybody know how to debug stored procedure , especially big stored procedure with cursor? Any existing tools? I'v heard it's easy in SQL Server 7 but we don't have it. Please, any advice will be very appreciated. Thanks.
I've seen on a few searches (obviously not dBforums searches :( ) that sometimes other folks are running into this, but I haven't yet seen an answer to it anywhere...so, how 'bouts our brainy folks consider it for a brief moment?
I'd 'preciate it immensely...
Trouble is, I cannot get any of my stored procs to run in debug mode through the SQL Query Analyzer. I have done this on many occasions before, but am unable to debug ANY sp's today.
Interesting thing is, that I initially named all my stored procs as "sp_<procname>" but since I read that is a no-no (since sp_ procs are assumed to be system stored procs, and the master db will be searched first at execution time - slowing things down a tad), I today changed all my procs to <procname> simply getting rid of the sp_ on each proc name.
I did this by first renaming the proc in Enterprise manager, then going into the proc (also in enterprise manager) and changing the proc name in the CREATE PROC statement (and, of course, changed all the references to other stored procs fro sp_<procname> to <procname>). then saving the proc in Enterprise Manager.
After investigating the problem further, I tried deleting the proc in EManager, then went to SQL Server and recreating it (both by scripting the proc and running it in SQL Query Analyzer AND just deleting and re-adding (as "add new proc" in EManager.
No effect.
Still can't debug. When I go into the debugger, it allows me to set up my params as usual, but then when I go to execute, it doesn't stop even at the first line of the proc...it just commences to rip through the procs and runs to the end (runs successfully, I might add...but provides no way to view the progress!!!)
Any thoughts? I know it's gotta be setup or something...but just can't figger it out.
I am from ASP.NET back ground now I am working in SQL Server 2005. I want to debug my stored procedure after coding end. In SQL 2000 there is an option of debug right click on the stored procedure but No such option present in SQL Server 2005 so I am unable to debug my Stored Procedure when any error occur.