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 6153185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:03:04+00:00 2026-05-23T20:03:04+00:00

I have an existing database with an accountnumber . I want to create a

  • 0

I have an existing database with an accountnumber. I want to create a script that will take that column as input and generate for each accountnumber a username/password/profile entry.

The profile entry would be the original account number.

So, for example assume I use accountnumber for user/pass as well…

This is what I Logically want to do

insert into ASPNETDB Select accountnumber, accountnumber as UserName, accountnumber as Password, accountnumber as profileentry from table1

I know that creating 1 user requires the use of some stored procs, that’s why I’m not sure how to do this.

  • 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-23T20:03:05+00:00Added an answer on May 23, 2026 at 8:03 pm

    Here it is, I just reread the MS documentation and just went for it. This sets up a user account and generates a key profile value for each record.

    declare @PPID NVARCHAR(20)
    declare @salt NVARCHAR(500)
    declare @stupid NVARCHAR(500)
    declare @UserId uniqueidentifier
    declare cur CURSOR LOCAL for 
    select PPID from webData..table where PPID is not null
    
    open cur 
    
    fetch next from cur into @PPID
    
    while @@FETCH_STATUS = 0 BEGIN 
    set @salt = @PPID + @PPID 
    set @stupid = 'TangiblePropertyId:S: 0:'  + CONVERT(VARCHAR(10),LEN(@PPID))
        --execute your sproc on each row 
       exec [aspnetdb].[dbo].[aspnet_Membership_CreateUser] '/',
      @PPID
      ,@PPID
      ,@PPID
      ,@salt
      ,null
      ,null
      ,1
      ,'01/01/2011'
      ,DEFAULT
      ,DEFAULT
      ,DEFAULT
      ,@UserID
    
        exec dbo.aspnet_UsersInRoles_AddUsersToRoles '/',@PPID,'TaxPayer','01/01/2011'
    EXECUTE  [aspnetdb].[dbo].[aspnet_Profile_SetProperties]  '/' , @stupid ,@PPID  ,''  ,@PPID  ,false  ,'01/01/2011'
    
    PRINT @stupid
    
        fetch next from cur into @PPID 
    END 
    
    close cur 
    deallocate cur 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing database(myDatabse) that I created with Microsoft Sql Managenent studio and
I have an existing database with tables which each have 4 partitions (there are
I have an existing database based on SQLiteOpenHelper that has several versions and code
I have an existing database. It has 1 non-default user (that is Without Login),
I have an existing database that I am now connecting to using hibernate. I
I have an existing PostgreSQL database that I'm using for a new Django site.
I have an existing database with several rows that violate a foreign key constraint.
I have an existing database that was setup (for whatever reason??) to store a
We have an existing SQL database, and I'm writing a node.js server that accesses
I have an existing database(Postgresql). How can i create models from it? How can

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.