|
-
September 10th, 2001, 12:19 PM
#1
seeding access autoincrement
hiya,
anyone know how to seed an autoincrement field to start at any given value.
Code so far is
set SolTd = NewDb.CreateTableDef("sol")
With SolTd
.Fields.Append .CreateField("ID", dbLong)
set NewFld = .Fields("ID")
NewFld.Attributes = DB_AUTOINCRFIELD
End With
thanx
mat
-
September 10th, 2001, 12:27 PM
#2
Re: seeding access autoincrement
set ref to ADOX
this code will create a new autoincrement field
Set col = New ADOX.Column
Set col.ParentCatalog = cat
With col
.Type = adInteger
.Name = "ID"
.Properties("Autoincrement") = True
End With
tbl.Columns.Append col
after that I think you can deal with this field as with any other one, i.e. enter any value.
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
|