Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 July 10th, 2007, 06:12 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to mfarooqw
Default insert data in two tables from form

I have two tables one for usernames and second for userdetails,

Users
_________________________
|ID (PK)| Usrname | PSW |
---------------------
|1 | User | P@sw|
-------------------------
Details
__________________________
|ID (FK)| firsn | Last_n |
--------------------------
| 1 | Test | Users |
--------------------------
Tables are related.

How can I write ASP.net stored procedure to insert data to both tables. So when new user registers and gives his username, password, first name and last name the data would insert into right tables.

 
Old July 10th, 2007, 08:34 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Write a procedure with two insert statements.
Quote:
quote:Originally posted by mfarooqw
 ...ASP.net stored procedure...

Do you mean a database stored procedure?

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to insert data in multiple tables? dstein4d Access VBA 3 November 18th, 2008 09:16 AM
Adding non-form data to an Insert chroniclemaster1 ASP.NET 2.0 Basics 5 February 17th, 2008 01:00 AM
Insert Data into two tables Lofa PHP Databases 4 July 7th, 2007 10:36 PM
How to insert bulk of data through form in databas ashuphp Beginning PHP 1 April 11th, 2007 07:36 AM
Coding for data input from one form to 2 tables... dgarcia1128 Access VBA 1 February 19th, 2004 12:35 AM





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