• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

access 2003 primary key question

does anyone know if Access stores the names of the primary keys in its systems tables or something else? for example, MS SQL Server stores the names of the primary keys in the sysobjects table, but i can't find it in Access. any ideas?
 
You can code an application to retrieve the table and field names from an ODBC complaint database. Where they are actually stored in Access, I never worried about.
 
yea but I want to be able to retrieve the names of the primary keys so that I can write a query to drop them. unless there is another way to drop them through an ODBC connection.
 
Originally posted by: aleksander3
yea but I want to be able to retrieve the names of the primary keys so that I can write a query to drop them. unless there is another way to drop them through an ODBC connection.
Advantage of developing in a higher level language - ability to build the SQL queries on the fly

 
Originally posted by: EagleKeeper
Originally posted by: aleksander3
yea but I want to be able to retrieve the names of the primary keys so that I can write a query to drop them. unless there is another way to drop them through an ODBC connection.
Advantage of developing in a higher level language - ability to build the SQL queries on the fly


i don't see what that has to do with getting a name of a primary key in an Access DB? these SQL queries need the name of the primary key that is going to be dropped, whether the query is built on the fly or not.
 
You can get the primary key via ODBC calls.

Last time I played with this was back in 00 though.

MSDN had a sample on how to get all the details on the DB and table info
 
The current ODBC driver i'm using for Access (4.00.6304.00) doesn't support the SQLPrimaryKeys() call. I can't find the names of the keys in any system table either so I can't build queries to get them from those tables. Anyone else have any answer?
 
Back
Top