Timeourt
-
Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks
millions of rows in a DataGridView? I pity the users then. This forum holds some 50,000 messages, yet you see only a few (say 25) of them at once. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks
logicon wrote:
50000000+ rows
It's horrible to load at a time, use paging technique in query. An example SQL Server 2005 Paging Results[^]
thatraja |Chennai|India|
Brainbench certifications
Down-votes are like kid's kisses don't reject it :-)
Do what you want quickly because the Doomsday on 2012 :-) -
millions of rows in a DataGridView? I pity the users then. This forum holds some 50,000 messages, yet you see only a few (say 25) of them at once. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:
-
Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:
you're talking to the wrong person here. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
-
you're talking to the wrong person here. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.
Yep. I replied to the wrong thread. My previous comment should have been applied to the original author, "logicon". Sorry Luc.
-
Sounds to me like you are trying to fetch way too many rows in one shot. You should re-think your logic and select only the rows you really need in your applicaiton. If you really need to accessing millions of rows, then maybe you should be using a datareader and not try to fill a dataset. Why don't you post a brief summary of what you are trying to do any the folks here will give you all kinds of ideas on how to attack the problem. Good luck. :thumbsup:
Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.
-
Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.
Use a DataReader to write a CSV file -- the user can then open the CSV in Excel. Slick as snot.
-
Hi David, You are correct, I should use datareader. The requirement is to provide a tool which brings rows in Excel from SQL Server so that end user can play with it using pivot and other excel stuff. What I initially planned was to write Excel Add-in. Unfortunately due to version issue (I had Excel 2007 and end user is having Excel 2010) I decided to write Windows Form Application which will have a DataGridView and "Export To Excel" button. Internally, SqlDataAdapter 's Fill is used here in my current code. I will try the DataReader and share the result with all you Thanks Everyone.
Use SQL server to output the resultset to a CSV file on a shared folder - slicker than snot!
Never underestimate the power of human stupidity RAH
-
Use SQL server to output the resultset to a CSV file on a shared folder - slicker than snot!
Never underestimate the power of human stupidity RAH
Not as portable as snot.
-
Hi All, I have a table with 50000000+ rows in SQL Server 2008 R2 Express. I am querying this database table from a .NET application. Unfortunately this table is not having any PK and probably its now possible to implement one. When I fire my query it doesn't works due to Timeout. I get error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. I am reading this with execute dataset method to fill my Datagridview. Please suggest me approach I should take to make this work. thanks