views:

780

answers:

4

How do I create all the ASP.Net tables, sprocs etc in a database that already has data (non conflicting) in it.

+2  A: 

This should help you:

http://blog.krisvandermast.com/CreateMembershipTablesInAnotherDatabaseThanTheStandardAspnetdbmdf.aspx

Program.X
This does answer the question, but considering how easy it is it is better (for availability reasons) to actually write the answer than just posting the link. Won't vote you down though, as you did answer the question =)
Tomas Lycken
+6  A: 

If you have access to the database, run the following commands in command line:

cd "C:\Windows\Microsoft.NET\Framework\v2.0.50727"
aspnet_regsql

That will start a guide that will help you add all the tables and sprocs to any table you can access from that computer.

Tomas Lycken
+2  A: 

From an article on 4GuysFromRolla, go to the %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\ directory and run

-- To use Windows Authentication (i.e., a "trusted connection"), use:

aspnet_regsql.exe -S <server> -E -d <database> -A all

-- To use SQL Server credentials (a UserID and Password), use:

aspnet_regsql.exe -S <server> -U <login id> -P <password> -d <database> -A all

There is also a wizard to help you through the steps.

John Oxley
Have used this method from 4Guys - it works like a charm.
David Robbins
+1  A: 

Nice post, this file is very useful "C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe !

http://www.linkee.fr

Linkee.fr