|
-
July 28th, 1999, 05:39 AM
#1
Adding fields from a code
Hello
I need to add a field to a Access database from a VisualBasic code
(and delete one field)
Can anyone advice on this ??
Thanks
-
July 28th, 1999, 05:50 AM
#2
Re: Adding fields from a code
if you use DAO to access your jet database, check out the TableDefs collection.
sample
Dim db as DAO.Database
set db = OpenDatabase("m:\daten\projekt\test.mdb")
Dim td as DAO.TableDef
set td = db.TableDefs("test2")
td.fields.remove("PK") ' remove
' add new fields
Dim fld as DAO.Field
set fld = td.createField("pk", dbLong)
fld.attributes = dbAutoIncrField
td.fields.append
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|