[AccessD] Alter Table

Susan Harkins harkins at iglou.com
Sun Apr 13 09:17:57 CDT 2003


Well, you'd need ALTER COLUMN:

dbs.Execute "ALTER TABLE JobsOutwork ALTER COLUMN LP_Description Text (250);"

Although, I can't guarantee it'll work with .Execute -- 

Susan H. 


  Tracy,
  AFAIR you cannot modify a field. you need to create a new field and copy the data to the new field. code, how to do this can be found in our famous BEU project. go to our webside download page and download the BEU.
  Lembit

  Lembit Soobik

    ----- Original Message ----- 
    From: Tracy 
    To: accessd at databaseadvisors.com 
    Sent: Sunday, April 13, 2003 10:04 AM
    Subject: [AccessD] Alter Table


    Hi Listers
    I'm trying to alter a Access table via code, I've tried the following:
      dbs.Execute "ALTER TABLE [JobsOutwork] ADD COLUMN LP_Description Text (250);"

    I'm trying to alter the field: LP_Description from being a text field of 100 characters to a text field of 250 characters, using the above line - generates the error message that the field already exists.
    Is there any programatic way to alter an existing table/field ?

    Any help appreciated.

    Cheers Tracy





----------------------------------------------------------------------------


    _______________________________________________
    AccessD mailing list
    AccessD at databaseadvisors.com
    http://databaseadvisors.com/mailman/listinfo/accessd
    Website: http://www.databaseadvisors.com



------------------------------------------------------------------------------


  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030413/e6b81b16/attachment-0001.html>


More information about the AccessD mailing list