2012年3月8日星期四
Any report runs once and then I have to log back in to my app
running into an issue we don't even understand why it's happening let alone
fixing it...
You can only run one report and then you have to logout of the app and log
back in to run another report. This is with any of our reports! They all
work but only the first report runs the first time. After that all of the
reports don't work. Logout and log back in and choose another report and it
works...?
Here's our code that is basically the same for every report...
dstDataSet = New DataSet
Dim strSPName As String = "spSRS_Appeal_TaxAgents"
'Passing the parameter to the SQL stored procedure
Dim aryParams(1) As SqlParameter
aryParams(0) = New SqlClient.SqlParameter("@.TaxYear", SqlDbType.Int)
aryParams(0).Value = CType(strTaxYear, Integer)
aryParams(1) = New SqlClient.SqlParameter("@.Cycle", SqlDbType.Int)
aryParams(1).Value = CType(strCycle, Integer)
Try
dstDataSet = SqlHelper.ExecuteDataset(cnnConn, strSPName,
aryParams)
Dim intCount As Integer = dstDataSet.Tables(0).Rows.Count
If intCount < 1 Then
lblInfo.Text = "Report records not found! Canceled operation."
Exit Sub
End If
Catch exn As Exception
lblInfo.Text = "Error. Failed to retrieve records! " & exn.Message
End Try
'Create the URL string to render this report from the SQL report
server
'SPParam is the parameter which is submitted to the SQL sotred
procedures
Dim str1, str2, str3, str4, strURL As String
str1 = "http://tennessee/reportserver?/astransc/AppealTaxAgents"
str2 = "&rs:Command=Render&rs:Format=PDF"
str3 = strTaxYear
str4 = strCycle
Dim strPath As New System.Text.StringBuilder
strPath.Append(str1)
strPath.Append(str2)
strPath.Append("&TaxYear=").Append(str3)
strPath.Append("&Cycle=").Append(str4)
strURL = strPath.ToString
Response.Redirect(strURL)
The report is in PDF format and when the report runs it pops up a form
asking if we want to open, save, or cancel the PDF file...
The programmer who wrote this doesn't have this issue on his machine.
However, on the test server this is occuring to us. In fact the programmer
asked for assistance because on his machine it on a rare occasion would not
create the PDF file but he couldn't find a cause for it. On our test server
it occurs like clock work. Log in, run one report (any of them) and then no
other report including the one you just called won't work until you log back
in....
In looking at the report server logs the subsequent requests are not even
making it to the report server? Any ideas? We were wondering if there was
something about the response.redirect? I can take the string created by
the code type it into a url address and it works every time?
Thanks,
KevinI have somewhat figured out what is occuring...
The viewstate is being clobbered when this is occuring (not entirely sure
how but suspect it is occuring because the redirect does not physically
change the page I am on, only creates a do you want to open, save, cancel
this PDF file dialog box). I can only assume that the response.redirect is
the cause now. I am going to figure out a way to accomplish this task.
Kevin
"Kevin" wrote:
> We have an asp.net app that calls the report server for our reports. We are
> running into an issue we don't even understand why it's happening let alone
> fixing it...
> You can only run one report and then you have to logout of the app and log
> back in to run another report. This is with any of our reports! They all
> work but only the first report runs the first time. After that all of the
> reports don't work. Logout and log back in and choose another report and it
> works...?
> Here's our code that is basically the same for every report...
> dstDataSet = New DataSet
> Dim strSPName As String = "spSRS_Appeal_TaxAgents"
> 'Passing the parameter to the SQL stored procedure
> Dim aryParams(1) As SqlParameter
> aryParams(0) = New SqlClient.SqlParameter("@.TaxYear", SqlDbType.Int)
> aryParams(0).Value = CType(strTaxYear, Integer)
> aryParams(1) = New SqlClient.SqlParameter("@.Cycle", SqlDbType.Int)
> aryParams(1).Value = CType(strCycle, Integer)
> Try
> dstDataSet = SqlHelper.ExecuteDataset(cnnConn, strSPName,
> aryParams)
> Dim intCount As Integer = dstDataSet.Tables(0).Rows.Count
> If intCount < 1 Then
> lblInfo.Text = "Report records not found! Canceled operation."
> Exit Sub
> End If
> Catch exn As Exception
> lblInfo.Text = "Error. Failed to retrieve records! " & exn.Message
> End Try
> 'Create the URL string to render this report from the SQL report
> server
> 'SPParam is the parameter which is submitted to the SQL sotred
> procedures
> Dim str1, str2, str3, str4, strURL As String
> str1 = "http://tennessee/reportserver?/astransc/AppealTaxAgents"
> str2 = "&rs:Command=Render&rs:Format=PDF"
> str3 = strTaxYear
> str4 = strCycle
> Dim strPath As New System.Text.StringBuilder
> strPath.Append(str1)
> strPath.Append(str2)
> strPath.Append("&TaxYear=").Append(str3)
> strPath.Append("&Cycle=").Append(str4)
> strURL = strPath.ToString
> Response.Redirect(strURL)
> The report is in PDF format and when the report runs it pops up a form
> asking if we want to open, save, or cancel the PDF file...
> The programmer who wrote this doesn't have this issue on his machine.
> However, on the test server this is occuring to us. In fact the programmer
> asked for assistance because on his machine it on a rare occasion would not
> create the PDF file but he couldn't find a cause for it. On our test server
> it occurs like clock work. Log in, run one report (any of them) and then no
> other report including the one you just called won't work until you log back
> in....
> In looking at the report server logs the subsequent requests are not even
> making it to the report server? Any ideas? We were wondering if there was
> something about the response.redirect? I can take the string created by
> the code type it into a url address and it works every time?
> Thanks,
> Kevin
2012年3月6日星期二
Any reason to avoid SQL Mail on a Production Server?
The application is extremely poorly written (deadlock, timeout, stored
procs longer than my kids Christmas lists...) and I would like to have
SQL Mail installed to get various information emailed to us when one
of these events occur (through alert).
I meet stiff resistance from the Production guys but without proper
reason.
Before I put my head on the line... Is there any reason we should be
scared to install SQL Mail on a Production box?
One developer told me that it used to hang their production SQL
Server... (but that may have been SQL Server 6.5)
Thanks
EricEric,
> The application is extremely poorly written (deadlock, timeout, stored
> procs longer than my kids Christmas lists...) and I would like to have
> SQL Mail installed to get various information emailed to us when one
> of these events occur (through alert).
>
I would not necessarily view long stored proc as a bad thing. If the task
needs a long stored proc, so be it. It will perform better than breaking it
down to shorter ones.
> One developer told me that it used to hang their production SQL
> Server... (but that may have been SQL Server 6.5)
>
Though not scared, we did see some problem with Outlook:
1. When a process involves Outlook mail, and the mail server or client is
down, the process hangs (at least we saw this on SQL7).
2. Not whether a general problem or server specific: we saw that a SQL7
server's service be restarted by a too long mail recipient value.
We have the notifications you are considering on most of our servers. Just
mention this for your consideration to be prepared to talk to your
counterparts in other groups.
hth
Quentin|||Well, you'll need to run SQL under a domain user account -- not necessarily
a domain admin if you set all the appropriate permissions, but without a
domain user, there's no way to hook to an Exchange mailbox.
You'll also need to install a MAPI-compliant email program on the server
(preferably Outlook). Yet anothe application on a production server means
another point of hacking attacks.
In my experience, SQL Mail and SQL Agent Mail (they are two different
things) don't crash a server, but there are circumstances where they'll
stop working. If they try to send an email while the Exchange server is
offline or unreachable, that particular MAPI session can get messed up, but
remains in memory. You need to stop and start SQL Mail/SQL Agent Mail to
get it working. There are some ways around this like including a .pst file
in the profile you use for mail, but that too has issues.
Another option you may want to look into is Gert Drapers SMTP-based email
(www.sqldev.net). The only thing installed is an extended stored procedure,
it doesn't run into the problems MAPI can create, and you don't need to set
SQL to run under a specific account. The only limitation is that you can
use it for the integrated alert system.
Hope that helps.
"Eric Mamet" <eric_mamet_test@.yahoo.co.uk> wrote in message
news:11269dcb.0307250628.35979849@.posting.google.com...
> We are supporting a SQL Server 2000 (sp3) / ASP application.
> The application is extremely poorly written (deadlock, timeout, stored
> procs longer than my kids Christmas lists...) and I would like to have
> SQL Mail installed to get various information emailed to us when one
> of these events occur (through alert).
> I meet stiff resistance from the Production guys but without proper
> reason.
> Before I put my head on the line... Is there any reason we should be
> scared to install SQL Mail on a Production box?
> One developer told me that it used to hang their production SQL
> Server... (but that may have been SQL Server 6.5)
>
> Thanks
>
> Eric|||> The only limitation is that you can
> use it for the integrated alert system.
I assume you meant "can't"...
To get around this limitation, I simply add a step to jobs I need alerts
for:
step 1
call some sql
if succeeds, quit with success
if fails, goto step 2
step 2
call xp_smtp_sendmail to send alert
-- so that the failure of step 1 is correctly reflected in sys:
if succeeds, quit with failure
if fails, quit with failure|||I think I'll try to get them to install Outlook.
Our SQL Server and SQL Agent services already run under domain
accounts.
Otherwise I know there are ActiveX objects available to send mail on
our production machine but it would be far less convenient than
xp_sendmail.
Thanks for your comments
Eric
2012年2月18日星期六
Any Help please!
I am new to asp.net so I am not sure what I am doing wrong??
I have installed Visual Studio 2003, and the .net framework, we currently use sql server 2000
I have created a report in visual studion with raw SQL and I want to deploy it to my local host, however I get the message "no report server was found at (my server)"
I also tried to install reporting services but when I do I get the message "asp.net not registered with web server"
I know I am proberly missing something simple but I just cant locate it
Any help appreciated
Thanks
TimHi
|
You can't install SQL Reporting Services on a non server OS. You can only install a client version on XP to allow you to create SRS reports and preview them. When you build your SRS projects in VS 2003 it tries to deploy the report to your actual reportserver(server OS box). In your case you didn't specify a location. Do this : In VS2003. Click on Project >> Properties >> Configuration Properties >> Delpoyment. Fill in the "TargetServerURL" something likehttp:\\<server>\reportserver and add a TargetFolder to deploy the report to. Just click OK and build the Solution it will deploy the report to your SQL Reporting Server box.
, Hope this helps
l0n3i200n
|||
Hi
Thanks for the reply, I tried what you said and I still get the message "no report server was found at....."
PS: I am running this on our local server with server 2000
Regards
Tim
|||There is a necessary sequence of events to follow:
Let me try to understand what you have posted -
Windows 2000 or 2003 was installed as the OS -
After installation did you go to MANAGE YOUR Server and indicate that within MANAGE YOUR SERVER ROLES the following:
Application Server indicate to configure Front Page Extensions and ASP.Net
After that you installed SQL 2000
Installed the service packs especially SP3a
Downloaded RSEVAL (Reporting Services)
Installed with SP1 and SP2
After reporting services was installed - go to IIS and select properties of Report Server and make sure anonymous access is disabled.
From your browserHTTP://localhost/reports
If you cannot get to the above http - then there are a bunch of minor issues - post back!
If you can get to above URL
edit administrator and ensure they can dio everything for the time being
Within your RS project point to your server and also to your database within the project properties and also ensure this is the dame within your data sources (shared) or spperate.
Data Source=YOUR SERVER NAME;Initial Catalog=YOUR DATA BASE NAME
Post back so we can help!
|||I read this post again - Run RSGEGISTER -- Done deal --|||
I am having the same problem. My SQL Server is on my machine. But the Report Server is on a server that I have to access, not on my machine. I keep getting the error:
An error has occurred during report processing. (rsProcessingAborted)Get Online HelpCannot create a connection to data source 'SANDO'. (rsErrorOpeningConnection)Get Online HelpAn OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.
2012年2月16日星期四
Any easy Class method to update about 100 fields of a database using stored procedure?
Hi all,
I am using C# for ASP.NEt 2003.
I would like to know if there is any easy method to update a database with about 100 fields in it.
At present, I pass all the values of the controls on the web form to the stored procedure as parameters like :-
myCommand.Parameters.Add("@.CustomerID", SqlDbType.Int).Value = txtCustomerID.text
Like this, I add all 100 parameters.
Is there any easy method to do it using a class or any other methods?
Thanking you in advance,
Tomy
I my opinion not, this is why Microsoft developed LINQ in C# 3.0.
To be able to create objects that can be passed as parameters.
|||I assume that you have win form. It is possible to have a table in your application which will have field for each input data field on your form, you can bound your form controls to data so they will be automatically updated. Next you can use data adapter with insert and/or update statements(it can be your stored procedure) defined to run with parameters based on your table. I do not know if it will work for you but it is probably the only solution where you do not have to pass all your values to parameters of stored procedure.
Thanks
Any difference between MSDE and SQL Server 2000 :-?
Hi,
I am developing an web-database application using ASP.net,c# and MSDE. and after the completion of the project i want to deploy the database over the server whichs got sql server professional edition.
Are there any changes to be made while deploying it over the server and also will the connection string for MSDE and SQL client the same ?
Please do clear me the confusions i have got ..
thanks inadvance
No difference. Just move it over, change the credentials you use to connect, and all will be well.|||
Hey Hi,
Thanks for ur reply man.. Now i dont have any kinda confusions with these 2, i will continue my work.
Thanks again
2012年2月9日星期四
ANSI settings on sql connection
does anyone have a clue?Use the following statement first in the batch:
SET ANSI_DEFAULTS ON | OFF