Need Autonumber returned

Results 1 to 3 of 3

Thread: Need Autonumber returned

  1. #1
    Join Date
    Dec 1969

    Default Need Autonumber returned

    Hi, all <BR> I did try to find this else were first. It is listed in the Common DataBase Questions But the Answer just bring me to a HTTP/1.1 404 Object Not Found page lol Anyway the question there is "I need to get the value of an Autonumber field (in MS Access) upon a record insert. How do I do this!?" <BR>And that is my question "help please"

  2. #2
    Join Date
    Dec 1969

    Default RE: Need Autonumber returned

    i don&#039;t know if this will help you, but i found this:<BR><BR>&#060;cfquery datasource="dsn"&#062;<BR> INSERT INTO amazon([columns])<BR> VALUES([values])<BR> SELECT @@IDENTITY AS amazon_item_id<BR>&#060;/cfquery&#062;<BR><BR>found it here:<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default That's what the FAQ says, too...

    But it may only work if you have used the JET OLEDB driver *not* the Access driver.<BR><BR>&#060;%<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.Op en ".... Jet driver ..."<BR><BR>conn.Execute "INSERT ..."<BR>Set RS = conn.Execute( "SELECT @@IDENTITY" )<BR>newID = RS(0)<BR>RS.Close( )<BR>...<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts