Re: OleDb Connection to XML File




I would code up a strong dataset, and use that. (as previously mentioned).

Be careful if you have multiple threads reading/writing data.

The DataSet.WriteXml() an DataSet.GetXml() ....... it doesn't get much
easier than that.

I do this for small config data stuff all the time.


EMPHASIS on the "small".






"Jason Barnett" <JasonBarnett@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:617AEA77-7B71-47A6-A4A2-8D2A7A69D22C@xxxxxxxxxxxxxxxx
I've built an assembly that processes "Job" objects. A Job object stores
information about an automated task. This Job object could have a
collection
of parameters that are needed to run, and those parameters are fed by the
executing assembly. The executing assembly I'm currently developing is a
Singleton-like web service designed to run a collection of Job objects.
I'm
trying to design it so that it has little or no knowledge of the Job
objects.

With that in mind, I don't believe storing values in a config file will
work
because 1) the web.config file does not allow you to save AppSettings, and
2)
the executing assembly must know about the parameters it's loading (it
must
be recompiled each time a parameter is added).

I've thought of storing the parameters in a local data source (a flat-file
of some sort), which the executing assembly could load. The data source
would store the Job identifier, the parameter identifiers and values, and
a
simple Update statement for updating the parameter values after a job is
complete. Other approaches I'm considering is storing a snippet of code
that
the executing assembly would have to process (not sure if that's
feasible),
or writting Jobs as assemblies that the executing assembly dynamically
loads
based on a common interface found with Reflection.

Bottom line... I'm exploring my options and wondering how (if possible) to
connect to an XML file with OLE DB.


"Patrice" wrote:

The main problem is likely to write...

Another option would be to just use a dataset (that can be loaded/stored
to
an xml file). Note though that this is likely valid if you don't have to
much data as it was never intended to be a replacement for databases...

Or perhaps the good old Xml API (or the LINQ to XML flavor) would be
enough
(not sure what you want from that extra layer ?).

Also you have checked the config file option and for some reason decided
not
to use this option ? (AFAIK you can also refer to antoher file from a
config
file if you just want to keep this separate from your main config file).

As always it's better to give some details about what you are trying to
do
(the kind and the number of settings you are trying to save would likely
help to raise better suggestion).


--
Patrice

"Jason Barnett" <JasonBarnett@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de groupe de discussion :
8F81FE52-AA43-48D3-9DF4-BED00842AE4E@xxxxxxxxxxxxxxxx
I would like to create an OleDb connection to an XML File, but I cannot
find
information about the connection string parameters. Is this possible?

I've got some parameters that an application uses and I have decided
that
it
would be best to store it in a database-like storage area. I figured I
could
store the values in a CSV, XLS, or MDB file and maintain the parameters
through a OleDb connection. However, I wondered if I could use XML as
well.
I don't want to rely on a server connection and I don't want to load
anything
on the client.

For what it's worth, I'm using VS2005.





.



Relevant Pages

  • Re: OleDb Connection to XML File
    ... Or perhaps the good old Xml API would be enough ... Also you have checked the config file option and for some reason decided not ... information about the connection string parameters. ... would be best to store it in a database-like storage area. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: parsing config files from an api... xml?
    ... >> allows one to parse and edit, update various config files on linux. ... The way XML has developed, the only way to use it is by generating it ... produce a DOM tree and hand this over to Batik to produce PNG files. ...
    (comp.os.linux.development.system)
  • Re: Wanted:MAIL.MAI structure definition
    ... exports using XML. ... SMTP mail and all the software out there which processes RFC-compliant headers ... I would maintain that to store mail messages you would need to use CLOB ... Every mail message arriving into an OpenVMS system gets its format converted. ...
    (comp.os.vms)
  • Re: ruby / rexml / xpath bug?
    ... puts of the XML. ... end # end each store ... Longitude: -74.107299 ...
    (comp.lang.ruby)
  • RE: accessing membership DB from windows (not ASP) app
    ... Not sure what your problem is - but the following code works for me - and the private m_connectionString variable reflects the new connection string... ... private static void ShowCS() ... Configuration config = ConfigurationManager.OpenExeConfiguration; ...
    (microsoft.public.dotnet.framework.aspnet.security)

Quantcast