SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 16th, 2000, 05:22 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
how to update 2 tables using using stored procedure

<i><b>Originally posted by : asiya (asiya@talk21.com)</b></i><br />hi and help me pls<br />i am trying to insert data into 2 tables from an asp page using sql stored procedure, the problem am having is, i want to set the first table primary key as a foreign key in the second table<br />can you help me pls<br />thank you <br />asiya<br /><br />

Reply With Quote
  #2  
Old September 19th, 2003, 05:55 AM
zw0503 zw0503 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 zw0503 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It should be the other way round
a key (foreign) is related to a primary key
give more details how does your stored procedure look
because your stored procedure will do the actual work
the fact that you want to access it from asp is not relevant in this context

Reply With Quote
  #3  
Old November 19th, 2003, 03:11 PM
jwinkler81 jwinkler81 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Kansas City, MO, USA
Posts: 1 jwinkler81 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

You need to use the adOpenKeyset cursor type, then right after the update, you can pull the key from the inserted record.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > how to update 2 tables using using stored procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT