Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 11, 2012 07:14 AM by Chen Yu - MSFT
Dec 08, 2012 09:42 AM|LINK
I have two databases in my asp.net website project. The first one is the pre-built login ASPNETDB.MDF which handles logins and registers new users. The second database is data I have imported from Sql Server. I have made event handlers so when buttons are
pressed it should get information from these databases and put it into textboxes. I have been told that the code for this is correct, but I should only have one database. The fact there is two DBs is causing some conflict & it is bad practice to have more
than on e DB. I have tried to copy the tables from one database to paste them into the other database. But there doesn't seem to be a way to paste the tables in . Does anyone know a way I can get these tables into the one database? Thanks in advance...
Dec 10, 2012 12:49 PM|LINK
1. There's nothing wrong with having more than one database.
2. To import tables from one database to another, use the import wizard. Right click on your destination database and choose Tasks > Import Data. Then follow the directions in the wizard.
Dec 11, 2012 07:14 AM|LINK
If you want to copy some tables data from database1 into another database2, you can do this in T-SQL.
CREATE TABLE dbo.TargetTable (...)
INSERT INTO dbo.TargetTable (...)