Showing posts with label keys. Show all posts
Showing posts with label keys. Show all posts

Wednesday, March 21, 2012

Naive Question on Export Data

Hi All,
When data is exported, to another database, the primary keys are not
available in the exported tables. Is there a way to export the data in the
tables along with all the properties of the table, I mean creating a ditto
copy of the original table along with data.
Thanks
kd
If you want a replica of the database, I suggest you use backup and restore.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"kd" <kd@.discussions.microsoft.com> wrote in message
news:948F9BFC-7F18-4BFA-9572-F516066E539F@.microsoft.com...
> Hi All,
> When data is exported, to another database, the primary keys are not
> available in the exported tables. Is there a way to export the data in the
> tables along with all the properties of the table, I mean creating a ditto
> copy of the original table along with data.
> Thanks
> kd
>

Wednesday, March 7, 2012

My Table that uses aspnet foreign Keys wont display anything - CAUTION - Noob at work

I've created a new table in ASPNETDB.mdf called 'customerInfo'. Most of the fields are, for the moment, data that exists in one of the existing ASPNET tables eg Membership_UserId (primary key), Membership_Email, Users_UserName etc.; the list goes on. I have put a new column 'amountspent' - just to test that I can do what I think I can do, however the table doesn't display any data. Am I OK in thinking that I can use the aspnet data in my own tables and reference through foreign keys to them. I've made sure that the procedure that I used to put the table into a gridview on the webpage is OK as I did the same thing to the membership table and that displays all of its data. Can someone either explain the steps I need to make this happen correctly or point me in the direction of a noob type walkthrough.

Thanks

ps I've used several different ways to link the tables. First I tried building the relationships through the SqlMembershipProvider, created tables and added the foreign keys. Not sure of whether I'd done this correctly, I then used the diagram method which is pretty straightforward, however the result is the same. Surely now these tables are keyed to the UserId of aspnet_Users they should build and display a table of my existing test membership - even if the other fields, for the moment, are not carrying any data?