Solved

How do I copy a Typed Dataset to another project

Posted on 2007-12-04
3
1,619 Views
Last Modified: 2011-09-20
Greetings,

I have a complex Typed Dataset that I created in a Visual Studio 2005 C# project.

I would like to copy this typed dataset to and use it in another project.

What is the best way to do this?

Bob
0
Comment
Question by:bobsegrest
3 Comments
 
LVL 13

Expert Comment

by:SameerJagdale
ID: 20409267
when you create a typed dataset, it create 3-4 files. The only important file is .designer file which contains classes. You can add a new code file, name it to <dataset>.cs and copy the contents of .designer file to it. Now delete the original dataset (it deletes all the relevant files).
You can now use the code file as a dataset.

hope it helps.
0
 
LVL 7

Accepted Solution

by:
badbearontour earned 500 total points
ID: 20409750
I usually copy all the files dataset files over to the new project

Then include the file in the new project.... open the dataset and close it again. that recompiles the classes code.

The only change then is to correct the namespace in the <dataset>.cs file to whatever it should be in the new application.

BB
0
 
LVL 13

Author Closing Comment

by:bobsegrest
ID: 31412749
The component I had missed was the change in name space.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
converto datetime always changes format 9 41
Switching Visual Studio 2015 to normal debug display 3 38
MailAddress in vb 4 29
Change to file doesn't show up 16 52
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question