share auto-generated, typed dataset

C

C P

I've got a Windows Forms application that I'm using to create a typed
dataset (C#) and a corresponding XML file (with data) that I'm encrypting.
This Windows Forms application is only to be used by me to create the
typed-dataset and XML file. I want to use the typed dataset in some
assemblies that I will be shipping to a customer. I will also ship them the
encrypted XML file that only my assemblies will be able to read. I will
give them controlled access to the data from the XML file through my own
classes.

The way things are now, my typed dataset it being created in my WinForms app
(that I don't want to give out). Other than manually copying the .XSD and
cs files for the typed dataset to one of my .dll assemblies (every time it
changes) is there a way to have the WinForms app create the dataset and
associated files, but have them actually saved as part of a different
assembly? I would like to keep the DataAdapters and SqlConnection that I
use to create the typed DataSet out of the assemblies I am distributing.
Right now, the DataAdapters and Connection are in the WinForms app, and I'd
like to keep them there.

Thanks,
Chris
 
C

C P

I think part of my problem was that I was generating the dataset from my
Form, and then including the resulting dataset in the designer for the form.
Now, I am still generating the dataset from the Form's designer, but not
including the resulting dataset (.xsd) in the form's designer. I can then
easily move the dataset to the assembly where I want it, and refer to this
assembly from my WinForm app to create the typed dataset at runtime in the
WinForm app or my other assemblies.

I think this solves my problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top