|
-
March 15th, 2001, 08:54 AM
#1
I would like to add new fields in existing "table1" in Database (mdb)
Hi
I need help to insert a new fields in existing table (mdb)...
So I would like to use Data object to insert new fields (just it's possible)
How can i do that ?
Thanks
Redg
-
March 15th, 2001, 09:16 AM
#2
Re: I would like to add new fields in existing "table1" in Database (mdb)
Dim tbl As ADOX.Table
Set tbl = New ADOX.Table
tbl.Name = "tblCustomer"
cat.Tables.Append tbl
'=========
Dim col As ADOX.Column
Set col = New ADOX.Column' Create first name field
With col
.Name = "FirstName"
.DefinedSize = 50
End With
' Add the new column to the table.tbl.Columns.Append col
Set col = New ADOX.Column
' Create last name field.
With col
.Name = "LastName"
.DefinedSize = 50
End With
' Add the new column to the table.
tbl.Columns.Append col
'or--------shortcut to add column------
tbl.Columns.Append "FirstName", _
adVarWChar, 50
tbl.Columns.Append "LastName", _
adVarWChar, 50
'------------
Iouri Boutchkine
[email protected]
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
|