开发者

How to retrieve last autoincremented value in MS-Access like @@Identity in Sql Server

开发者 https://www.devze.com 2022-12-16 12:19 出处:网络
I wan开发者_如何学Pythont to retrieve identity column value in ms access from an autoincremented column.

I wan开发者_如何学Pythont to retrieve identity column value in ms access from an autoincremented column. Basically i m running a transaction in which i have to write two insert queries. 2nd query will be containing autoincremented value that was generated from query 1. how can i do that ?


However, Microsoft Access 2000 or later does support the @@IDENTITY property to retrieve the value of an Autonumber field after an INSERT

Source: Retrieving Identity or Autonumber Values

EDIT: As noted by @David-W-Fenton, you'll also need to use Jet 4.0 OLE DB Provider (this is also described into that previous document)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号