Results 1 to 2 of 2

Thread: Auto insert record

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    382

    Auto insert record

    I have 2 tables
    Register (email , username , pass )
    Userprofile ( email , userimage)

    I want that if user register then email from register table automatically insert into the userprofile table

    is it possible ?

    and i don't want to fire 2 querryr at register button

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Auto insert record

    Duplicating data like that is a bad idea. You should have a column in the secondary table that can store the primary key from the primary table. That's a foreign key. If you need data from both tables you execute a query with a join.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width