Click here to Skip to main content
15,902,114 members
Home / Discussions / Database
   

Database

 
QuestionGetting "When connecting to SQL Server 2005 Error" using MS SQL 2000? Pin
eyeseetee11-Feb-08 21:48
eyeseetee11-Feb-08 21:48 
Generalsqlserver2005 Pin
Jeeno24711-Feb-08 21:24
Jeeno24711-Feb-08 21:24 
GeneralRe: sqlserver2005 Pin
Joe11-Feb-08 22:24
Joe11-Feb-08 22:24 
Questionsqlserver2000 database backup Pin
renuka9011-Feb-08 20:21
renuka9011-Feb-08 20:21 
GeneralRe: sqlserver2000 database backup Pin
D. Shyam11-Feb-08 21:04
D. Shyam11-Feb-08 21:04 
GeneralFirewalls and remote connections Pin
blackjack215011-Feb-08 19:32
blackjack215011-Feb-08 19:32 
Questionsql and pl/ sql [modified] Pin
Member 470807711-Feb-08 18:57
Member 470807711-Feb-08 18:57 
GeneralRe: sql and pl/ sql Pin
Christian Graus11-Feb-08 19:00
protectorChristian Graus11-Feb-08 19:00 
GeneralRe: sql and pl/ sql Pin
Joe11-Feb-08 19:34
Joe11-Feb-08 19:34 
Questionsqlserver [modified] Pin
Member 470807711-Feb-08 18:49
Member 470807711-Feb-08 18:49 
NewsRe: sqlserver Pin
Venkatesh Mookkan11-Feb-08 18:57
Venkatesh Mookkan11-Feb-08 18:57 
Questionsqlserver [modified] Pin
Member 470807711-Feb-08 18:44
Member 470807711-Feb-08 18:44 
GeneralRe: sqlserver Pin
Gandalf_TheWhite11-Feb-08 18:59
professionalGandalf_TheWhite11-Feb-08 18:59 
QuestionSql Record Select Pin
sivaprakas11-Feb-08 16:07
sivaprakas11-Feb-08 16:07 
GeneralRe: Sql Record Select Pin
Elina Blank1-Mar-08 11:45
sitebuilderElina Blank1-Mar-08 11:45 
GeneralSql Select [modified] Pin
NewToAspDotNet11-Feb-08 7:19
NewToAspDotNet11-Feb-08 7:19 
AnswerRe: Sql Select Pin
Ashfield11-Feb-08 7:45
Ashfield11-Feb-08 7:45 
GeneralRe: Sql Select Pin
NewToAspDotNet11-Feb-08 7:57
NewToAspDotNet11-Feb-08 7:57 
GeneralRe: Sql Select Pin
Ashfield11-Feb-08 22:34
Ashfield11-Feb-08 22:34 
GeneralRe: Sql Select Pin
Krish - KP11-Feb-08 17:34
Krish - KP11-Feb-08 17:34 
GeneralRe: Sql Select Pin
Ashfield14-Feb-08 8:18
Ashfield14-Feb-08 8:18 
GeneralAgain Crystal Report Pin
simworld11-Feb-08 4:36
simworld11-Feb-08 4:36 
again I am sending the same problem but this time I searched in google for the code,and use the code that I got from this forum
what I have found i am sending,

---------------------------------------
CrystalReport1 report=new CrystalReport1();

report.ReportOptions.EnableSaveDataWithReport = false;

CrystalDecisions.Shared.TableLogOnInfo myLogin;

CrystalDecisions.Shared.ConnectionInfo oCRConnectionInfo = new CrystalDecisions.Shared.ConnectionInfo();

foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";

myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);

}

OleDbConnection oleConn = new OleDbConnection("Provider=sqloledb; data source = .; initial catalog = inventory; user id = sa; password = 123456");

oleConn.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from student",oleConn);

DataSet ds=new DataSet();

da.Fill(ds);

CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument;

myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
myReportDocument.Load(@"C:\Inetpub\wwwroot\temp\CrystalReport1.rpt",CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);

myReportDocument.SetDataSource(ds);
this.CrystalReportViewer1.ReportSource =myReportDocument;

CrystalReportViewer1.DataBind();

CrystalReportViewer1.RefreshReport();

CrystalReportViewer1.DisplayToolbar = true;

CrystalReportViewer1.DisplayGroupTree = false;

oleConn.Close();

I did not got any error but my crystal Report Viewer contains no data i.e. it contains only Crystal Report Toolbar ,no data(Blank Report)


If I use F11 to run step by step ,I found the execution did not enter in the following Code.

foreach (CrystalDecisions.CrystalReports.Engine.Table myTable in report.Database.Tables)
{
myLogin = myTable.LogOnInfo ;
//myLogin.ConnectionInfo.ServerName="(local)";
myLogin.ConnectionInfo.ServerName=".";
myLogin.ConnectionInfo.UserID = "sa" ;
myLogin.ConnectionInfo.Password = "123456" ;
myLogin.ConnectionInfo.DatabaseName="temp";

myTable.ApplyLogOnInfo(myLogin) ;
myTable.Location.Substring(myTable.Location.LastIndexOf(".") + 1);
}

What urgent modifications I need to perform?
Help me.
I am using .Net version 2003.
GeneralPDF Problem Pin
simworld11-Feb-08 4:29
simworld11-Feb-08 4:29 
GeneralReporting in MS Accesss Pin
Vimalsoft(Pty) Ltd11-Feb-08 0:54
professionalVimalsoft(Pty) Ltd11-Feb-08 0:54 
Questionenable remote connection for sql server 2000? Pin
eyeseetee11-Feb-08 0:09
eyeseetee11-Feb-08 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.