Determining Foreign/Primary Keys in a Table
- From: Tronman@xxxxxxxxx
- Date: 7 May 2007 07:41:56 -0700
Hello, I'm looking for a generic way to determine Foreign/Primary keys
for a table in a Database I'm connected to via ODBC. The two examples
I've been working with so far are an Access Database and an Oracle
Database.
What I've tried so far:
I can determine Primary Keys (using the System.Data.ODBC controls
in .NET) but not foreign keys.
Also, I've been trying to use the API-calls SQLPrimaryKeys and
SQLForeignKeys from Visual C++ 6.
SQLForeignKeys doesn't crash, but doesn't return anything.
SQLPrimaryKeys works properly in Oracle; but Access gives me an error
number of -1 (Driver does not support this function). How could it not
support this? Any why won't ForeignKeys return anything at all (I have
specifically set and committed the foreign keys).
I can provide my source if thats helpful, and advice would be
appreciated! Thanks!
.
- Prev by Date: File DSN connection issues to VFP DBF
- Next by Date: Determining Foreign/Primary Keys in a Table
- Previous by thread: File DSN connection issues to VFP DBF
- Next by thread: Determining Foreign/Primary Keys in a Table
- Index(es):