Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Determining Table Length in Visual Basic

Discussion in 'Information Technology' started by j, Jul 28, 2006.

  1. j

    j
    Expand Collapse
    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?)
     
  2. Loading...

    Similar Threads Forum Date
    As A Child, Public Marches Of Sikhism Made Me Uncomfortable. They Still Do . Why ? Whats The Logic Hard Talk Oct 16, 2016
    Arts/Society Backyard Vegetable Garden Language, Arts & Culture Dec 27, 2013
    Heritage Now a Vegetable Market, Ranjit Singh's Royal Haveli a Picture of Neglect History of Sikhism Nov 11, 2013
    Sikhism Helium: 1984 and the "Periodic Table of Hate" (Jaspreet Singh) Book Reviews & Editorials Oct 28, 2013
    Heritage How our entire history was dumped in a horse stable History of Sikhism Oct 28, 2013

  3. Brendan Reynolds

    Brendan Reynolds
    Expand Collapse
    Guest

    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.

    --
    Brendan Reynolds
    Access MVP

    "j" <j@discussions.microsoft.com> wrote in message
    news:21BEE5FC-788D-4B5D-AC63-A40438F4D4FB@microsoft.com...
    >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?)
     
  4. dbahooker@hotmail.com

    dbahooker@hotmail.com
    Expand Collapse
    Guest

    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


    Brendan Reynolds wrote:
    > 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.
    >
    > --
    > Brendan Reynolds
    > Access MVP
    >
    > "j" <j@discussions.microsoft.com> wrote in message
    > news:21BEE5FC-788D-4B5D-AC63-A40438F4D4FB@microsoft.com...
    > >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?)
     
  5. dbahooker@hotmail.com

    dbahooker@hotmail.com
    Expand Collapse
    Guest

    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


    Brendan Reynolds wrote:
    > 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.
    >
    > --
    > Brendan Reynolds
    > Access MVP
    >
    > "j" <j@discussions.microsoft.com> wrote in message
    > news:21BEE5FC-788D-4B5D-AC63-A40438F4D4FB@microsoft.com...
    > >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?)
     
  6. dbahooker@hotmail.com

    dbahooker@hotmail.com
    Expand Collapse
    Guest

    ACCESS DATA PROJECTS i meant sorry

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


    dbahooker@hotmail.com wrote:
    > 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
    >
    >
    > Brendan Reynolds wrote:
    > > 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.
    > >
    > > --
    > > Brendan Reynolds
    > > Access MVP
    > >
    > > "j" <j@discussions.microsoft.com> wrote in message
    > > news:21BEE5FC-788D-4B5D-AC63-A40438F4D4FB@microsoft.com...
    > > >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?)
     

Share This Page