[AccessD] Alter Table

Andy Lacey andy at minstersystems.co.uk
Sun Apr 13 10:08:45 CDT 2003


Adding or deleting a column yes. But I get syntax error from "ALTER
COLUMN" and Help doesn't recognise it either.
 
Oh wait. It's an A97 problem. Works in A2K but not A97, which is pretty
much all I use, so that's my excuse for my ignorance. Well, Tracy,
hopefully Susan's solved it for you. As for BEU, mmmmm...........
 

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 Susan Harkins
Sent: 13 April 2003 15:18
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Alter Table


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 <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




  _____  




_______________________________________________
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/a6179af1/attachment-0001.html>


More information about the AccessD mailing list