Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Thursday, March 29, 2012

Error reporting from SP to .NET code, how?

Hey

ASP.NET 2.0 + MS Sql Server 2005 Express (that version which comes with VS2005)

This code below fails. The Delete method executes a stored procedure, but somehow this SP fails. The SP shown here is a short version of the actual SP. As you see from the code below, there are no way the Delete method can know if SP executed successfully. I assume I just could have returned @.@.error, but that just gives an error number, and not the description of the error??.. And how should I capture exceptions like these?? How should code this SP so it report the error??

Any suggestions??

public override void Delete(System.Guid id, int user)
{
using (SqlConnection cn = new SqlConnection(this.ConnectionString))
{
SqlCommand cmd = new SqlCommand("SendMessage", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@.id", SqlDbType.UniqueIdentifier).Value = id;
cmd.Parameters.Add("@.user", SqlDbType.Int).Value = user;
}
}

ALTER PROCEDURE dbo.DeleteMessage @.id uniqueidentifier, @.user int
AS
BEGIN
UPDATE table_A set column_A = 1 WHERE Id = @.id;
DELETE FROM table_B WHERE Id = @.id;
IF (@.@.error = 0)
COMMIT TRAN;
ELSE
ROLLBACK TRAN;
END

there is a couple of way to report that what happened, you can use execute nonquery to get number of rows affected by last SQL command, you can return from your procedure single cell using SELECT with value 0 for success and 1 for error and finally you can use output parameters and read its values after procedure executes. See T-SQL help in SQL management studio express which is very good and you can find everything you wont.

Friday, March 23, 2012

Error on viewing Crystal Report

hello,

i designed an application containing Crystal Report in VB.NET and viewed the application and Report successfully on my system. But when i try to execute the same packaged application on a different system, i get an error message saying that a dll cannot be found or invalid code.

Please help me to debug the application.check the CrystalRuntime|||You need to install Crystal Report Runtime module.
Please check this thread (http://www.dev-archive.com/forum/showthread.php?t=432198).

error on report server

when I try to run the report from VS.NET (SQL Server 2005 Business
Intelligence Development Studio). I got the following message:
======================================================================= TITLE: Microsoft Report Designer
--
A connection could not be made to the report server
http://localhost/ReportServer2005.
--
ADDITIONAL INFORMATION:
Client found response content type of 'text/html; charset=utf-8', but
expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting
Services 9.00.1399.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content=" at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.Load()
at
Microsoft.ReportingServices.Diagnostics.RSConfiguration.Construct(String
configFileName)
at Microsoft.ReportingServices.Diagnostics.RSConfiguration..ctor(String
configFileName, String location)
at
Microsoft.ReportingServices.Diagnostics.RSConfigurationManager..ctor(String
configFileName, String configLocation)
at Microsoft.ReportingServices.Library.Global.get_ConfigurationManager()
at Microsoft.ReportingServices.WebServer.Global.StartApp()
at
Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object
sender, EventArgs e)" />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt;
COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt;
DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt;
COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC;
TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300;
TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC;
TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300;
TEXT-DECORATION:underline}
</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>The report server has encountered a configuration error. See the
report server log files for more information. (rsServerConfigurationError)
</li><ul>
<li>Access to the path 'C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is
denied.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span
class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)
--
BUTTONS:
OK
--
=======================================================================
This is the error message I got when I try to run
http:\\localhost\reportserver2005 in IE. I got same error message when I run
http:\\MachineName\reportserver2005.
======================================================================= Reporting Services Error
----
a.. The report server has encountered a configuration error. See the
report server log files for more information. (rsServerConfigurationError)
a.. Access to the path 'C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting Services\ReportServer\RSReportServer.config' is
denied.
----
SQL Server Reporting Services
=======================================================================
Please help!
Thank you very much
Darren L.Can you access http://localhost/Reports ? This is the default setting.
It looks like some setting problem. What does the log file say?|||Hi,
I ran http://localhost/Reports2005, I got following error:
The report server is not responding. Verify that the report server is
running and can be accessed from this computer.
I am thinking the problem maybe the setup (installation). I have SQL
Server 2000 Reports Service on my machine. When I installed the SQL Server
2005 Report Service. It simply tells me that report service has been
installed. So I created a new instance Reports2005 and ReportServer2005. Is
this the reason why it is not working? And what should I do to fix it?
Thanks
Darren
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696210.625104.289820@.g49g2000cwa.googlegroups.com...
> Can you access http://localhost/Reports ? This is the default setting.
> It looks like some setting problem. What does the log file say?
>|||Not sure if I am in the right log:
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
ConnectionType to '0' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
IsSchedulingService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
IsNotificationService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
IsEventService to 'True' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
PollingInterval to '10' second(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
WindowsServiceUseFileShareStorage to 'False' as specified in Configuration
file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MemoryLimit to '60' percent as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
RecycleTime to '720' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MaximumMemoryLimit to '80' percent as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MaxQueueThreads to '0' thread(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
IsWebServiceEnabled to 'True' as specified in Configuration file.
ReportingServicesService!configmanager!4!1/19/2006-10:02:52:: w WARN:
WebServiceAccount is not specified in the config file. Using default:
DL-DELL700M\ASPNET
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration
file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
MaxScheduleWait to '5' second(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
ProcessRecycleOptions to '0' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
RunningRequestsScavengerCycle to '60' second(s) as specified in
Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
RunningRequestsAge to '30' second(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
DailyCleanupMinuteOfDay to default value of '120' minutes since midnight
because it was not specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
WatsonFlags to '1064' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
WatsonDumpOnExceptions to
'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException'
as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
WatsonDumpExcludeIfContainsExceptions to
'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException'
as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
SecureConnectionLevel to '0' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
DisplayErrorLink to 'True' as specified in Configuration file.
ReportingServicesService!library!4!1/19/2006-10:02:52:: i INFO: Initializing
WebServiceUseFileShareStorage to 'False' as specified in Configuration
file.
ReportingServicesService!servicecontroller!9!1/19/2006-10:02:57:: Total
Physical memory: 1055309824
ReportingServicesService!servicecontroller!4!1/19/2006-10:02:58:: i INFO:
RPC Server started. Endpoint name ='ReportingServices$MSSQL.3'
ReportingServicesService!library!3!1/19/2006-10:21:54:: i INFO: Catalog SQL
Server Edition = Developer
ReportingServicesService!resourceutilities!3!1/19/2006-10:21:54:: i INFO:
Reporting Services starting SKU: Standard
ReportingServicesService!resourceutilities!3!1/19/2006-10:21:54:: i INFO:
Evaluation copy: 0 days left
ReportingServicesService!library!3!1/19/2006-10:21:54:: e ERROR: restricted
SKUs: Workgroup Express Developer Evaluation - actual SKU Developer
ReportingServicesService!library!3!1/19/2006-10:21:54:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services.
ReportingServicesService!library!a!1/19/2006-10:21:54:: i INFO: Catalog SQL
Server Edition = Developer
ReportingServicesService!library!a!1/19/2006-10:21:54:: e ERROR: restricted
SKUs: Workgroup Express Developer Evaluation - actual SKU Developer
ReportingServicesService!library!a!1/19/2006-10:21:54:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services.
ReportingServicesService!library!3!1/19/2006-10:21:55:: i INFO: Catalog SQL
Server Edition = Developer
ReportingServicesService!library!3!1/19/2006-10:21:55:: e ERROR: restricted
SKUs: Workgroup Express Developer Evaluation - actual SKU Developer
ReportingServicesService!library!3!1/19/2006-10:21:55:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException:
The feature: "Using other editions of SQL Server for report data sources
and/or the report server database" is not supported in this edition of
Reporting Services.
There are few error statements at the buttom. But...
Thanks
Darren L.
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696210.625104.289820@.g49g2000cwa.googlegroups.com...
> Can you access http://localhost/Reports ? This is the default setting.
> It looks like some setting problem. What does the log file say?
>

Monday, March 12, 2012

Error occured while establishing connection with sql server

I am new learner of ASP.NET and SQL server.So there might be any mistake in writing code.

When I tried to run my project I got following error.I am uisng SQL 2005 server.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

connection string used is

<addname ="ConnectionString"connectionString="Data Source=BLUESTAR\\SQLEXPRESS;Initial Catalog=KnowledgeAssetManagement;Integrated Security=True"/>

I have also tried by setting local & remote connection options from the SQL server surface Area Configuration and connections option from server properties of sql server management studio.

Please help me ,my work get stucked due this problem.

Hi Bluestar123

In your connection string you do not need to have to forward slashes after bluestar see connection string below

<add name ="ConnectionString" connectionString="Data Source=BLUESTAR\SQLEXPRESS;Initial Catalog=KnowledgeAssetManagement;Integrated Security=True"/>

Hope this helps

Regards

ScottyB

|||

Hi ScottyB,

Actually I have given only one slash after bluestar in connection string but it gives me error 'Unrecognized Escape Sequence' so after searching on google I have given that double slashes which removes that error.

Thanks for your reply ,

can you suggest any other solution?

Friday, February 17, 2012

error message "running IIS failed ...see hresult "

hi,
I'm working on "MERGE REPLICATION"...i followed the procedure same as the book
"SQL SERVER CE DATABASE DEVELOPMENT WITH the .NET COMPACT FRAMEWORK"Author Rob Tiffany, ch9,10

i got one error msg that..."a request to send data to the computer funning IIS failed,for more information seeHRESULT " ..When my program hits rep.Syncronize()...

here my codes
\\\\\\\\\\\\\\\\\\\\\\\

rep = New SqlCeReplication

rep.InternetUrl= "https://seawolf/fieldagentrda/sscesa20.dll"

rep.InternetLogin = "robtiffany"
rep.InternetPassword = "pinnacle"
rep.Publisher = "seawolf"
rep.PublisherDatabase = "IntelligenceData"
rep.PublisherLogin = "sa"
rep.PublisherLogin = "apress"

rep.Publication = "IntelligenceDataPublication"
rep.Subscriber = "subscriber"

rep.SubscriberConnectionString="Datasource=\My Documents\" & _"IntelligenceData.sdf;" & _ "SSCE:Database Password=apress"

If File.Exists("\MyDocuments\IntelligenceData.sdf") Then

rep.Synchronize()

Else
MessageBox.Show("You must first create a database", "Error")

End If
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
can anyone help me ,how to solve this issue?
Thanks in advance


There is one posting, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=333541&SiteID=1.

Can you try to see whether this one helps?

Thanks.

This posting is provided AS IS with no warranties, and confers no rights.

|||

hi,

Thank u for ur suggestion

i already try out my program with IP adress...but the error is same....

On that link ,another friend sent the reply like... " put sql instance in a diffrent box....test box"......but i don't understand what is meant by 'sql instance' and 'move the replication to a test box on the lan'.....do u have any idea?

Thanks

-nafi

error message "running IIS failed ...see hresult "

hi,
I'm working on "MERGE REPLICATION"...i followed the procedure same as the book
"SQL SERVER CE DATABASE DEVELOPMENT WITH the .NET COMPACT FRAMEWORK"Author Rob Tiffany, ch9,10

i got one error msg that..."a request to send data to the computer funning IIS failed,for more information seeHRESULT " ..When my program hits rep.Syncronize()...

here my codes
\\\\\\\\\\\\\\\\\\\\\\\

rep = New SqlCeReplication

rep.InternetUrl= "https://seawolf/fieldagentrda/sscesa20.dll"

rep.InternetLogin = "robtiffany"
rep.InternetPassword = "pinnacle"
rep.Publisher = "seawolf"
rep.PublisherDatabase = "IntelligenceData"
rep.PublisherLogin = "sa"
rep.PublisherLogin = "apress"

rep.Publication = "IntelligenceDataPublication"
rep.Subscriber = "subscriber"

rep.SubscriberConnectionString="Datasource=\My Documents\" & _"IntelligenceData.sdf;" & _ "SSCE:Database Password=apress"

If File.Exists("\MyDocuments\IntelligenceData.sdf") Then

rep.Synchronize()

Else
MessageBox.Show("You must first create a database", "Error")

End If
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
can anyone help me ,how to solve this issue?
Thanks in advance


There is one posting, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=333541&SiteID=1.

Can you try to see whether this one helps?

Thanks.

This posting is provided AS IS with no warranties, and confers no rights.

|||

hi,

Thank u for ur suggestion

i already try out my program with IP adress...but the error is same....

On that link ,another friend sent the reply like... " put sql instance in a diffrent box....test box"......but i don't understand what is meant by 'sql instance' and 'move the replication to a test box on the lan'.....do u have any idea?

Thanks

-nafi