sSQL = "SELECT Count(*) As MyCount FROM [" & oTableName & "]"
I am using the following code to count the number of records in my SQL tables.
For larger tables of 5 million records or more it seems to take very long
Is there a faster way to do this?
Dim cn As New SqlConnection(oConnectionString)
Dim cmd As New SqlCommand(sSQL, cn)
oCount_Records_InTable = cmd.ExecuteScalar.ToString
If cn.State <> ConnectionState.Closed Then