Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Keys from MS Access
Message
 
To
20/05/2013 02:29:31
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Jet/Access Engine
Application:
Desktop
Miscellaneous
Thread ID:
01574288
Message ID:
01574295
Views:
51
>Hi
>I have established a connection to Access database using SQLConnect(). SQLTable() and SQLColumns() are working.
>I would like to get primary key from MS Access database like we do EXEC sp_pkeys @table_name = 'Table_Name'" in SQL Server.
>Any idea how to do this?

You can try
select @@identity
You should get the Autonumber field of the record you just inserted.

It works for me in Vb.net using ado.net. I connect via oledb, not sure how relevant that is.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform