[AccessD] Alter Table

Andy Lacey andy at minstersystems.co.uk
Sun Apr 13 09:01:43 CDT 2003


Just to add to what Lembit's said, Tracy, we found (on the BEU project)
that altering the length of a text field was, frustratingly, a real
problem, to the extent that we opted out of doing it. It can't be done
programmatically 9unless someone can tell me I'm wrong) which leaves
creating a new field, copying the data, deleting the old field and
renaming the new one back again. This is all very well except that if
the field is involved in indexes and/or relationships they have to be
recreated too. All very messy. Of course we had the option to just omit
the facility, which doesn't help you much if you have to do it. If you
do manage it, and crack all of those complexities, we'd be very
interested to know how. Sorry to be not much help.
 
 

Andy Lacey
http://www.minstersystems.co.uk <http://www.minstersystems.co.uk/> 



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Lembit Soobik
Sent: 13 April 2003 10:57
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Alter Table


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 <mailto:tracy at ak.planet.gen.nz>  
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


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


More information about the AccessD mailing list