DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Resizing Table Fields in DAO??

  1. #1
    Dave Guest

    Resizing Table Fields in DAO??


    Hi, this may be a simple question although I'm starting to become a bit confused
    on how I can resize a specific field in a table in an Access2000 database
    using DAO and VB. I know I can delete the field and recreate it again using
    the .append method, the problem with all this is that I still need to have
    the current data inside the table still intact after the resize of the field
    is complete.

    Can anyone help me with this? Thanks in advance.

  2. #2
    Douglas J. Steele Guest

    Re: Resizing Table Fields in DAO??

    The "classic" technique is to:

    - rename the old field
    - add the new field with the correct name and size
    - run an update query to transfer the data from the old field to the name
    - delete the old field
    - compact the database

    This is essentially what Access does behind the scenes if you do this
    through the GUI (although it doesn't do the Compact)

    However, with Access 2000, you can use the Alter Table statement in SQL.
    Afraid I don't have the syntax, as I don't use Access 2000.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele


    "Dave" <dav23a45@hotmail.com> wrote in message
    news:3ba76ff8$1@news.devx.com...
    >
    > Hi, this may be a simple question although I'm starting to become a bit

    confused
    > on how I can resize a specific field in a table in an Access2000 database
    > using DAO and VB. I know I can delete the field and recreate it again

    using
    > the .append method, the problem with all this is that I still need to have
    > the current data inside the table still intact after the resize of the

    field
    > is complete.
    >
    > Can anyone help me with this? Thanks in advance.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center