Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 594885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:00:07+00:00 2026-05-13T16:00:07+00:00

I have a site using the asp.net membership schema. I’d like to set up

  • 0

I have a site using the asp.net membership schema. I’d like to set up a trigger on the aspnet_users table that inserted the user_id and the user_name of the new row into another table.

How do I go about getting the values from the last insert?

I can select by the last date_created but that seems smelly. Is there a better way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:00:07+00:00Added an answer on May 13, 2026 at 4:00 pm

    try this for sql server

    CREATE TRIGGER yourNewTrigger ON yourSourcetable
    FOR INSERT
    AS
    
    INSERT INTO yourDestinationTable
            (col1, col2    , col3, user_id, user_name)
        SELECT
            'a'  , default , null, user_id, user_name
            FROM inserted
    
    go
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site using ASP.NET Membership and have a number of roles that
I have a site that I am currently working on in ASP.NET 2.0 using
I have a site using ASP.NET membership. I also have an excel file with
Our site is using ASP.Net Membership. I have a page which literally has nothing
I have website that uses ASP.net Membership Provider. This web site will be served
I've been developing a site using ASP.NET MVC, and have decided to use the
I am currently creating an e-commerce site using C# ASP.NET MVC and have just
I have a site developed in ASP.NET and hosted on a windows server using
I have an ASP.Net 2.0 web site, using the DotNetNuke framework (4.09), and it
I'm using ASP.NET Membership. I'm running it on a shared hosting site where I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.