Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table(table_1(userid,datetime)) which has 30,000 records.
Now I have written a function in which I declare table(@table_2(userid,datetime)) like table_1.
insert @table_2
select * from table_1
Now @table_2 and table_1 has same number of records.

in my function I want to select userid bases of datetime which one is better i select from @table_2 or table_1

actually when I create report in win form it gives an error "The Operation Time Out".If I select records from table_1 and make some calculation for report date wise.
In winform

C#
public void getReportFrmServer(string report, string[] param)
      {
          try
          {
              this.reportViewer1.ServerReport.ReportPath = "/Report From_Iris_New/" + report;
              ReportParameter[] parameter = new ReportParameter[1];
              parameter[0] = new ReportParameter("startDate", param[0]);             
              this.reportViewer1.ServerReport.SetParameters(parameter);
              this.reportViewer1.RefreshReport();


          }
          catch (Exception exception)
          {
              MessageBox.Show(exception.Message);
          }

      }

it gives an error "The Operation Time Out"

I try to generate report from sql server business intelligence development studio
it generates report so I think ReportViewer does render report it gives error "The Operation Time Out"
Posted
Updated 3-Sep-14 2:16am
v5
Comments
Magic Wonder 3-Sep-14 6:11am    
Why r u creating duplicate table if you need all records same as original one?
Gihan Liyanage 3-Sep-14 6:17am    
As your details provided selecting from both are same.. Cannot understand your requirement.
OriginalGriff 3-Sep-14 6:20am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Magic Wonder 3-Sep-14 7:32am    
You Have to work at SQL level. Check provided link in my solution, hope that may help you.

Hi,

Check this....


How Do I Speed Up My Select * Query Of "530,000" Rows[^]


Hope this will help you.


Cheers
 
Share this answer
 
Select data from any one of the table as both the tables are replica of each other.
 
Share this answer
 
C#
public void getReportFrmServer(string report, string[] param)
      {
          try
          {
              this.reportViewer1.ServerReport.ReportPath = "/Report From_Iris_New/" + report;
  this.reportViewer1.ServerReport.Timeout = 3600000;
              ReportParameter[] parameter = new ReportParameter[1];
              parameter[0] = new ReportParameter("startDate", param[0]);
              this.reportViewer1.ServerReport.SetParameters(parameter);
              this.reportViewer1.RefreshReport();


          }
          catch (Exception exception)
          {
              MessageBox.Show(exception.Message);
          }

      }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900