Re: Show Column Name of Access database

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Michael Keating (michael.keating_at_[S$S$S)
Date: 07/26/04

  • Next message: Jim Rodgers: "Re: Using VB to create an Excel file."
    Date: Mon, 26 Jul 2004 19:46:24 +0100
    
    

    Hi there,

    You're probably right about .Net, but as Paul pointed out, this group isn't
    for .Net.

    I deliberately didn't specify the code with ADO, DOA or RDO as in VB you can
    use whichever you prefer simply by adding a reference and specifying the
    correct recordset object .. i.e. ADODB.Recordset etc.

    And from a personal preference perspective .. if I copy and paste a piece of
    code and it works perfectly, I forget it .. if I have to play with it a
    little to make it work .. then I've learned more :-)

    MFK.

    "Ternoey (GMX.DE)" <Ternoey@gmx.DE> wrote in message
    news:O#4KozwcEHA.3480@TK2MSFTNGP11.phx.gbl...
    > Nice but
    > I don't think that will work with ADO.NET and VB.NET application because
    > recordset does not exist anymore.
    >
    >
    >
    > "Michael Keating" <michael.keating@[S$S$S]dsl.pipex.com> wrote in message
    > news:ebLSrTocEHA.2908@TK2MSFTNGP10.phx.gbl...
    > > Hi,
    > >
    > > The solution is not too far from your pseudo code
    > >
    > > Dim rs As New Recordset
    > > Dim thisfield As Field
    > >
    > > For Each thisfield In rs.Fields
    > > Debug.Print thisfield.Name
    > > Next
    > >
    > > that will list every field name in the recordset.
    > >
    > >
    > > HTH
    > >
    > >
    > > MFK
    > >
    > >
    > > "Ternoey (GMX.DE)" <Ternoey@gmx.DE> wrote in message
    > > news:u49yjjncEHA.2468@TK2MSFTNGP09.phx.gbl...
    > > > Hi
    > > >
    > > > I'm writing small dynamic application with an Access database that
    must
    > > > display records. The database has now 100 colums and 950 rows which
    are
    > > > growing dynamically.
    > > >
    > > > How can I display each column name of a dataset or tabel? The best
    way
    > is
    > > > that it works something like this..
    > > >
    > > > for each column in a dataset
    > > > show columnname
    > > > next column
    > > >
    > > > Thx
    > > > Carlo
    > > >
    > > >
    > >
    > >
    >
    >


  • Next message: Jim Rodgers: "Re: Using VB to create an Excel file."

    Relevant Pages

    • Re: Declaring variables - basic question
      ... In some languages, including VB.NET, you can declare multiple variables in ... variables have been declared "Dim rs, rh, Dt As Recordset". ... And if you are going to correct this mistake, you may as well specify the ... Dim rs As Recordset ...
      (microsoft.public.access.gettingstarted)
    • Re: Removing members from multiple groups in a OU
      ... then bind to each group object and use the Remove ... ' Specify the Distinguished Name of the user. ... ' Filter on groups the user is a member of. ... ' Move to the next record in the recordset. ...
      (microsoft.public.windows.server.scripting)
    • Re: Muti Dimmed Array Problem
      ... 'you need to specify the indexes of both dimensions ... Don't forget, with a recordset, you can use GetRows to create an array ... Please reply to the newsgroup. ...
      (microsoft.public.scripting.vbscript)
    • Re: Split database, returning error 3251
      ... You can't open a table-type recordset on a linked table. ... (it works fine in the un-split database) ... > ' Specify record to find. ...
      (microsoft.public.access.formscoding)
    • Re: Show Column Name of Access database
      ... The solution is not too far from your pseudo code ... Dim thisfield As Field ... that will list every field name in the recordset. ...
      (microsoft.public.vb.database)