>>I tried using Connectiontimeout = 0, but it did not work for the large table<<
That is because it is not ConnectionTimeout, but rather CommandTimeout and setting it to 0 is equivalent of an infinite time, that is your application could appear to hang for a very long time. Don't do that.
Main Topics
Browse All Topics





by: angelIIIPosted on 2009-08-09 at 10:45:34ID: 25055087
in "model" database?
me) from dbo.tickdata_master"
that database should NOT be used for your applications, it's used as template when creating new databases!
>str = "select count(*) from dbo.tickdata_master"
does the table have a primary key?
if yes:
str = "select count(primary_key_field_na
do you need a exact count? if not, you could query the sys.indexes system view, it contains a rowcnt field, but it's not necessarily 100% up-to-date. but with 140 Millions rows, possibly not the real problem, if instead you can get the record count "instantly"