Friday, March 30, 2012
Log on server error
i am using report files already created an configured with a dsn.
when i try to view the report using crystal report viewer in a web form i am getting the error
"CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed."
i am using
<code>
ConnectionInfo cnnInfo = new ConnectionInfo ( ) ;
cnnInfo.ServerName = strConnInformation[0] ;
cnnInfo.DatabaseName = strConnInformation[1] ;
cnnInfo.UserID = strConnInformation[2] ;
cnnInfo.Password = strConnInformation[3] ;
ReportDocument rptDoc = new ReportDocument ( ) ;
rptDoc.Load ( Server.MapPath ( "..//Reports//" + reportFileName ),
OpenReportMethod.OpenReportByDefault ) ;
//CrystalDecisions.CrystalReports.Engine.Table table = rptDoc.Database.Tables[0] ;
CrystalDecisions.CrystalReports.Engine.Tables rptTables = rptDoc.Database.Tables ;
foreach ( CrystalDecisions.CrystalReports.Engine.Table tbl in rptTables )
{
tblLogOnInfo = tbl.LogOnInfo ;
tblLogOnInfo.ConnectionInfo = cnnInfo ;
tbl.ApplyLogOnInfo ( tblLogOnInfo ) ;
if ( tbl.Location.IndexOf ( "." ) > 0 )
{
tbl.Location = tbl.Location.Substring (
tbl.Location.LastIndexOf(".") + 1 ) ;
}
else
{
//tbl.Location = tbl.Location ;
}
}
</code>
its working fine when i try to execute a report file which configured direct to a database in another machine by specifying the server name, database name, user id and the password,
its showing the error only when i try to execute the report which configured using dsn. dsn is created in my machine and the actual database server is another one.
can any one help me in this matter as i have to use the reports with dsn only in my application.
i got the informations from the net that its same for both type of connectivity to use the ConnectionInfo object and the TableLogonInfo objects.
what my be the problem with me.
is its related to any permision issues.Hai Vinod,
Even i faced the same problem with my C# and Access .
But this prblem arised only when i have a subreport in my main report.
Do u have any subreports in ur appli...If so u have to provide login information to those reports also.
regards,
Kolluru.|||Thanks for your reply kolluru. i will try this and will get back :)|||Do u have any subreports in ur appli...If so u have to provide login information to those reports also.
Im having the same problem and I have subreports. How do you provide the login details for the subreports?sql
Log of Executed SQL
I am sure this is a very newbie questions, but...
How do you view what SQL statements have been run on your DB?
I have written an application in C#, and for some reasons some rows are being dropped. I would like to look up what SQL has been run against the Database to make it lose the rows. I was able to do this in MySql, but can not figure out how to do it in SQL Server/Express 2005.
Thanks for any help,
Normally you would use a nice tool like SQL Profiler to give you this data. But in your case (you don't get this tool with Express) I would take a look at sp_trace_create in Books Online and start from there.|||Thanks! That is exactly what I was looking for.
Log of Executed SQL
I am sure this is a very newbie questions, but...
How do you view what SQL statements have been run on your DB?
I have written an application in C#, and for some reasons some rows are being dropped. I would like to look up what SQL has been run against the Database to make it lose the rows. I was able to do this in MySql, but can not figure out how to do it in SQL Server/Express 2005.
Thanks for any help,
Normally you would use a nice tool like SQL Profiler to give you this data. But in your case (you don't get this tool with Express) I would take a look at sp_trace_create in Books Online and start from there.|||Thanks! That is exactly what I was looking for.sql
Monday, March 12, 2012
log file - beginner question
How I can view information stored into database log file (transaction log)?
Do I have any option to choose what kind of information will be registered
there? And finally: when I create database I have two option log file:
unrestricted file growth or restricted file growth to xxx MB. Is there any
way to ensure that when log file size reach max size then automatically
oldest entries are removed (rights now in such situation any operation on
database cause error).
MarcinRead the section in BOL (Books On-Line) on Backing Up and Restoring
Databases. Pay special attention to the section on Selecting a Recovery
Model. This will describe the function of the transaction log and what the
various choices do. Each choice has specific features and requirements so
read carefully before picking something and moving on.
--
Geoff N. Hiten
SQL Server MVP
Senior Database Administrator
Careerbuilder.com
"Marcin" <kevin123@.poczta.onet.pl> wrote in message
news:bhbf70$26mu$1@.foka.acn.pl...
> Hi,
> How I can view information stored into database log file (transaction
log)?
> Do I have any option to choose what kind of information will be registered
> there? And finally: when I create database I have two option log file:
> unrestricted file growth or restricted file growth to xxx MB. Is there any
> way to ensure that when log file size reach max size then automatically
> oldest entries are removed (rights now in such situation any operation on
> database cause error).
> Marcin
>
>|||>How I can view information stored into database log file (transaction log)?
Log Explorer from www.lumigent.com is one way
>Do I have any option to choose what kind of information will be
registeredthere?
SQL2000 has the concept of recovery models that determine logging
charcteristics of transactions (FULL,BULK LOGGED,SIMPLE). For more
information look up Recovery Models in BOL
>automatically oldest entries are removed
SIMPLE recovery mode will truncate the transaction log when it gets 70% full
assuming there are no open long running transactions. Regular log backups in
the other recovery models will have the same effect.
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Marcin" <kevin123@.poczta.onet.pl> wrote in message
news:bhbf70$26mu$1@.foka.acn.pl...
Hi,
How I can view information stored into database log file (transaction log)?
Do I have any option to choose what kind of information will be registered
there? And finally: when I create database I have two option log file:
unrestricted file growth or restricted file growth to xxx MB. Is there any
way to ensure that when log file size reach max size then automatically
oldest entries are removed (rights now in such situation any operation on
database cause error).
Marcin