how to get the autonumber value after inserting a record into an access db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aussie Rules

    how to get the autonumber value after inserting a record into an access db

    Hi,

    I have an access 2007 table that has an autonumber.

    Is it possible to get that value back as apart of a insert command ?

    Dim OleCommand As New OleDb.OleDbComm and

    OleCommand.Comm andType = CommandType.Tex t
    OleCommand.Conn ection = dbConnection

    OleCommand.Comm andText = "Insert into projects (ProjectName, Months,
    Description, etc
    OleCommand.Exec uteNonQuery()

Working...