Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Add a field ( column ) to an access database

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-05-07 : 09:56:14
Dave O writes "How could I add a field called MList ( type = text, length = 40, allowzerolength = Yes ) to an existing table ( called ABCDE ) of my Access 2000 database.

Also, is it possible to do this if the Database resides on my Web server using ASP code ?

Please redirect me if I'm asking in the wrong place.

Thanks in advance

DaveO"

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2002-05-08 : 19:34:14
Kind of depends whether you're using ADO with MSDE or whether you're using DAO 3.6 (ie JET)... ie - is your "access database" file an .adp or a .mdb?

I'll assume .mdb - and I think it goes something like this:

Dim db As Database
Dim tdf As TableDef

Set db = CurrentDb
Set tdf = db.TableDefs("ABCD")
tdf.Fields.Append tdf.CreateField("MLIST", dbText, 40)

Set tdf = Nothing
Set db = Nothing


--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -