Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field attributes in Access, Set object problem, Autonumber.

Status
Not open for further replies.

JonMa

Programmer
Jul 16, 2003
69
NO
Hello all helpers.
I am trying to find out which attributes a field have in any database, so I can avoid insert on that field.
However I do not know how to connect to a tabledef object in vbscript. The code below will not work because of the line "Set tdf = db.TableDefs("Person")".
Is there some connection missing to an object and how can I do it?

Set db = CreateObject("ADODB.Connection")
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:\asp\jon\Korps.mdb"

Set tdf = db.TableDefs("Person")
Set fld = tdf.Fields("KorpsID")
Msgbox fld.Attributes

Kindly Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top