Add the xsd to your project and select its Build Action to "Embedded
Resource." This builds the file into the EXE (or DLL). You can pass it to
ReadXmlSchema like this:
ds.ReadXmlSchema(System.Reflection.Assembly.GetExe cutingAssembly().GetManifestResourceStream("MyAppl ication.MySchema.xsd"))
Where MyApplication is the root namespace of your project.
You can do this with all sorts of files... like text files, Word documents,
RTF files, what have you.
P.S.
Alternatively, you should probably be converting your xsd's to "Typed
Datasets." They have their schema "built-in."
--
-C. Moya
www.cmoya.com
"pat" <pa*********@gmail.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Group,
I need to have my schemas loaded for a dataset, but can't have .xsd
files in my finished program laying around for users to mess with.
Is there a way to store the schema programmatically (preferably as data
in classes in .dlls, or even simple strings), thus avoiding having to
load them from the fs?
TIA!
pat
:)