Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle ASP
|
Oracle ASP Using ASP with Oracle databases. For Oracle discussions not specific to ASP, please see the Oracle forum. For more ASP discussions, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2006, 09:06 AM
Registered User
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Returning primary key into asp local variable!

Hello

Any help will be much appreciated. I am trying to insert a record and get the primary key of record at the same time. Is that possible? If so can I return the value into a local asp variable (x). I need the value to perform other inserts in other tables which have a foreign key linked to that primary key.

Eg. str_sql="INSERT INTO mytable VALUES ("'"name"'",.....) RETURNING primaryKey INTO :"& x &".

Thanks
Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
Foreign key not updating with Primary key xavier1945 BOOK: Access 2003 VBA Programmer's Reference 2 July 4th, 2007 09:48 PM
Primary key cf2006 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 July 31st, 2006 07:21 PM
FOREIGN KEY and PRIMARY KEY Constraints junemo Oracle 10 June 15th, 2004 01:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.