Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Friday, March 23, 2012

I can't debug my SQL Server project

I'm coding a TVF in C# and the debugger doesn't stop at all. It used to work when I was coding scalar functions, but it stop working since I removed my assembly from the DB and register it manually to test my SQL scripts. I removed the assembly again from my DB and re-deployed it with VS.2005 hoping that will fix it, but it didn't work. Right now I can't debug.

Have anybody had a problem like this before? Any help will be appreciated.

Do you use your TVF in default test script in your VS project?|||Yes. The weird thing is that the debugger was working before, and I debugged scalar functions. But since I deployed the assembly manually and then removed it to deployed it from VS.2005, somehow the debugger stopped working.|||Check content of output window, you could find error messages here.|||

Got it. There was a problem with a commented section in query.

Thank you.

sql

Monday, March 19, 2012

I cannot debug inside VS 2005 Developer Edition

Two questions...

1. I saw that you must have the Professional Edition and above to debug stored procedures. Is this available in the Developer Edition.

2. If #1 is okay, why do i not have the menu item, "Step Into Procedure" or whatever it's called?

Thank you,


Brian

What i installed was SQL Server 2005 Developer Edition, it came with a MSDN Professional Subscription. So i have the Professional Edition but i do not have the "Step Into Procedure" menu item when right-clicking a stored procedure within the Server Explorer? Maybe noteworthy here is that i did not install any of the languages, does that make a difference?

When i view debug options for Just-In-Time, i see a warning stating, "Another debugger has registered itself as the Just-In-Time debugger. To repair, enable Just-In-Time debugging or run Visual Studio repair." Could this be the reason for not having the ability to debug stored procedures?

Thanks,

Brian

|||

That means a problem with the current that doesn't have the Administrator privileges, check that out.

http://msdn2.microsoft.com/en-us/library/5hs4b7a6(VS.80).aspx fyi.

I can't debug my SQL Server project

I'm coding a TVF in C# and the debugger doesn't stop at all. It used to work when I was coding scalar functions, but it stop working since I removed my assembly from the DB and register it manually to test my SQL scripts. I removed the assembly again from my DB and re-deployed it with VS.2005 hoping that will fix it, but it didn't work. Right now I can't debug.

Have anybody had a problem like this before? Any help will be appreciated.

Do you use your TVF indefault test script in your VS project?
|||Yes. The weird thing is that the debugger was working before, and I debugged scalar functions. But since I deployed the assembly manually and then removed it to deployed it from VS.2005, somehow the debugger stopped working.|||Check content of output window, you could find error messages here.|||

Got it. There was a problem with a commented section in query.

Thank you.

Monday, March 12, 2012

I am using the reportingservice web service, everything runs fine but does'nt display report

Please am i doing something wrong, i debug the code no where it is giving me an error:

I am using the reportservice.asmx web service to render the report, but it is not displaying the report at all. it just shows me on IE saying Done with out any error, please can you tell me am i doing something wrong, after a very hard time i reached upto this point, on my form i just have a button on its click event i wrote the following code. and i have no other control on the form. except this code. just referencing the webservice.

thank you.

Dim rs As New ReportingService

Dim LogonCredentials As System.Net.NetworkCredential

Dim Items As CatalogItem

LogonCredentials = New System.Net.NetworkCredential("username", "password", "mydomainname")

rs.Credentials = LogonCredentials

'rs.Credentials = System.Net.CredentialCache.DefaultCredentials

rs.PreAuthenticate = True

' Render arguments

Dim result As Byte() = Nothing

Dim reportPath As String = "/PCSnetReports/StatusReport"

Dim format As String = "MHTML"

Dim historyID As String = Nothing

Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"

' Prepare report parameter.

Dim parameters(1) As ParameterValue

parameters(0) = New ParameterValue

parameters(0).Name = "eStatus"

parameters(0).Value = "All"

parameters(1) = New ParameterValue

parameters(1).Name = "UserName"

parameters(1).Value = "johnsmith" ' June

Dim credentials As DataSourceCredentials() = Nothing

Dim showHideToggle As String = Nothing

Dim encoding As String

Dim mimeType As String

Dim warnings As Warning() = Nothing

Dim reportHistoryParameters As ParameterValue() = Nothing

Dim streamIDs As String() = Nothing

Dim sh As New SessionHeader

rs.SessionHeaderValue = sh

Try

result = rs.Render(reportPath, format, historyID, devInfo, parameters, _

credentials, showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)

sh.SessionId = rs.SessionHeaderValue.SessionId

Console.WriteLine("SessionID after call to Render: {0}", rs.SessionHeaderValue.SessionId)

Console.WriteLine("Execution date and time: {0}", rs.SessionHeaderValue.ExecutionDateTime)

Console.WriteLine("Is new execution: {0}", rs.SessionHeaderValue.IsNewExecution)

Catch e1 As SoapException

Console.WriteLine(e1.Detail.OuterXml)

End Try

' Write the contents of the report to an MHTML file.

Try

Dim stream As FileStream = File.Create("report.mhtml", result.Length)

Console.WriteLine("File created.")

stream.Write(result, 0, result.Length)

Console.WriteLine("Result written to the file.")

stream.Close()

Catch e2 As Exception

Console.WriteLine(e2.Message)

End Try

Hi,

You need to call the LoadReport method on the RS object before you call the Render method. For example:

rsExecService.ExecutionInfo execInfo = new rsExecService.ExecutionInfo();

rsExecService.ExecutionHeader execHeader = new rsExecService.ExecutionHeader();

rsExec.ExecutionHeaderValue = execHeader;

execInfo = rsExec.LoadReport(reportPath, historyID);

rsExec.SetExecutionParameters(execParameterValues, "en-gb");

String SessionId = rsExec.ExecutionHeaderValue.ExecutionID;

try

{

// Cache the results within the report definition.

report.Data = rsExec.Render(format, devInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);

}

catch (SoapException e)

{

Console.WriteLine(e.Detail.OuterXml);

}

Regards

Sanjay