Retrieve an Access AutoInc Primary Key

From: Andre Greyling (agreyling_at_optusnet.com.au)
Date: 10/28/03

  • Next message: arnold: "oracle+storedproc"
    Date: Tue, 28 Oct 2003 16:57:48 +0200
    
    

    Hi

    I use an autoinc field for my tables Primary Key. In a typical orders/order
    items situation I need to retrieve a new records primary key for use in
    child records in another table.

    What is the best (and safest !) way to do this ?


  • Next message: arnold: "oracle+storedproc"

    Relevant Pages

    • Re: Cannot access the added row using Table.Select method
      ... quick watch window, it is showing me the latest value only, But If I ... Primary Key of my table is an auto indexed column in my table. ... I am not able to retrieve the row. ... >> Here I am facing the problem, I am not able to retrieve the row data if I ...
      (microsoft.public.dotnet.framework.adonet)
    • ASP.net DataGrid with LinkButton
      ... That primary key will be either a textbox or it can be a ... this primary key value into a standard select statement to retrieve uploaded ... another table of the database along with the previously viewed file. ... suspect this is a simple download from one table to another in the database. ...
      (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
    • Cannot access the added row using Table.Select method
      ... I am working on a windows application. ... I want to assign value - 10001 to the primary key ... I am able to assign the value, Now I am trying to retrieve the row like the ... Here I am facing the problem, I am not able to retrieve the row data if I ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: DBI & primary keys
      ... > retrieve the unique primary key that's created automatically by the db as ... > to want to know the primary key for a newly inserted record, ... "You can retrieve the most recent AUTO_INCREMENT value with the LAST_INSERT_IDSQL function" ...
      (comp.lang.perl.misc)
    • Re: copy auto_increment value to another field
      ... it seems that that prefix is quite redundant. ... could easily use the auto_increment primary key value, ... kudos as a prefixed string, ... retrieve the id value and add it into another field, ...
      (comp.lang.php)