Determining Table Length in Visual Basic

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want a button to determine the table length (as an integer) of a table in
my database using visual basic. Any ideas on how to do this (is there a
length or size function for this?)
 
What do you mean by the 'length' of a table? If you mean the number of
records, then DCount("*", "NameOfTableHere") will get that. With local
tables you can also use CurrentDb.TableDefs("NameOfTableHere").RecordCount,
but that will return -1 for linked tables.
 
dcount

shit friggin retard

a) migrate your shit to access
b) you can get a count of records without scanning the whole table if
you refer to sysindexes I believe. it should be up to date if you
refresh stats occassionaly.

I've never had a problem with it being out of date.

-Aaron
 
dcount

shit friggin retard

a) migrate your shit to access data projects -- as in SQL Server
b) you can get a count of records without scanning the whole table if
you refer to sysindexes I believe. it should be up to date if you
refresh stats occassionaly.

I've never had a problem with it being out of date.

-Aaron
 
ACCESS DATA PROJECTS i meant sorry

it's 100 times more efficent then a select count(*) or any of your
dcount horseshit
 
Back
Top