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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do identify Primary key from schema 1

Status
Not open for further replies.

hwkranger

MIS
Nov 6, 2002
717
US
I have the following that I can pull from the schema:

rst.Open CurrentProject.Connection.OpenSchema(adSchemaColumns, Array(Empty, Empty, strTableName, Empty))

gets me

0: TABLE_CATALOG =
1: TABLE_SCHEMA =
2: TABLE_NAME = Log
3: COLUMN_NAME = LogID
4: COLUMN_GUID =
5: COLUMN_PROPID =
6: ORDINAL_POSITION = 1
7: COLUMN_HASDEFAULT = False
8: COLUMN_DEFAULT =
9: COLUMN_FLAGS = 90
10: IS_NULLABLE = False
11: DATA_TYPE = 3
12: TYPE_GUID =
13: CHARACTER_MAXIMUM_LENGTH =
14: CHARACTER_OCTET_LENGTH =
15: NUMERIC_PRECISION = 10
16: NUMERIC_SCALE =
17: DATETIME_PRECISION =
18: CHARACTER_SET_CATALOG =
19: CHARACTER_SET_SCHEMA =
20: CHARACTER_SET_NAME =
21: COLLATION_CATALOG =
22: COLLATION_SCHEMA =
23: COLLATION_NAME =
24: DOMAIN_CATALOG =
25: DOMAIN_SCHEMA =
26: DOMAIN_NAME =
27: DESCRIPTION =

How do I know if a column is a primary key? I can't seem to find it...

Randall Vollen
National City Bank Corp.
 
Have you tried adSchemaPrimaryKeys instead of adSchemaColumns ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
No.. But I guess that's a good idea :) LoL

Randall Vollen
National City Bank Corp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top