Guys,
I need to count the number of rows in each table of an oracle database, the database has around 200 tables. I need to do this on a win form in Vis Studio. Usually, I would load into a dataset and just do a count on that, but the size of the database is crashing visual studio.
Its been a while soince I coded so sorry for the simplicity! I should know this. So far I have this to get a list of all of the table names....
Code:Private Shared mda As OracleDataAdapter Public Shared Function GetTableNames() As DataTable Dim dt As New DataTable Dim strSQL As String = String.Empty strSQL = "Select table_name from All_Tables" Dim oda As New OracleDataAdapter oda.SelectCommand = New OracleCommand(strSQL, cnn) With oda.SelectCommand If .Connection.State = ConnectionState.Closed Then .Connection.Open() End If End With oda.Fill(dt) Return dt oda.SelectCommand.Connection.Close() cnn.Close() End Function
Now how do I get a row count in there for each table....
Thanks
Bob




Reply With Quote