Permalink
Browse files

since we are casting this to long we should be using COUNT_BIG

  • Loading branch information...
1 parent aedbca4 commit 6aeb394dfde4a2f55ee84b3d4bf0c545227fd157 @ssandler ssandler committed Feb 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 TeslaSQL/DataUtils/MSSQLDataUtils.cs
@@ -608,7 +608,7 @@ IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{0}' AND
public Int64 GetTableRowCount(string dbName, string table, string schema) {
- var cmd = new SqlCommand(string.Format("SELECT COUNT(*) FROM [{0}].[{1}]", schema, table));
+ var cmd = new SqlCommand(string.Format("SELECT COUNT_BIG(*) FROM [{0}].[{1}]", schema, table));
return SqlQueryToScalar<long>(dbName, cmd);
}

0 comments on commit 6aeb394

Please sign in to comment.